Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make genai use common #86

Merged
merged 9 commits into from
Mar 19, 2024
Merged

Make genai use common #86

merged 9 commits into from
Mar 19, 2024

Conversation

rlazo
Copy link
Collaborator

@rlazo rlazo commented Mar 18, 2024

No description provided.

rlazo added 6 commits March 15, 2024 01:33
A few changes were required to get unit tests to work. Mostly:

- Move GenerateContentRequest validation from the model to the
APIController. It's better to centralize this logic
- Throw exceptions at the APIController level rather than model

Other changes were kept at a minimum to simplify review
@rlazo rlazo requested review from daymxn and davidmotson March 18, 2024 21:00
arrayOf("/modelname", "/modelname"),
arrayOf("modifiedNaming/mymodel", "modifiedNaming/mymodel"),
)
fun `TODO`() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

def should be done before we merge this tbh

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a very basic set of tests to unblock us.

There's some repeated code for testing between common and genai, this is expected for now. A follow up PR will contain a "common-test" module to make it easier to share code among both SDKs.

Comment on lines 64 to 65
* @property apiVersion the endpoint version to communicate with.
* @property timeout the maximum amount of time for a request to take in the initial exchange.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are out of date now, as they were moved to RequestOptions

@rlazo rlazo merged commit 36510c7 into common_dev Mar 19, 2024
5 checks passed
@rlazo rlazo deleted the rl.common.genai branch March 19, 2024 21:26
rlazo added a commit that referenced this pull request Mar 20, 2024
Missing fix from #86
@rlazo rlazo mentioned this pull request Mar 20, 2024
rlazo added a commit that referenced this pull request Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants