-
Notifications
You must be signed in to change notification settings - Fork 179
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
Conversation
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
common/src/test/java/com/google/ai/client/generativeai/common/StreamingSnapshotTests.kt
Outdated
Show resolved
Hide resolved
generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt
Outdated
Show resolved
Hide resolved
arrayOf("/modelname", "/modelname"), | ||
arrayOf("modifiedNaming/mymodel", "modifiedNaming/mymodel"), | ||
) | ||
fun `TODO`() { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
* @property apiVersion the endpoint version to communicate with. | ||
* @property timeout the maximum amount of time for a request to take in the initial exchange. |
There was a problem hiding this comment.
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
No description provided.