Closed nileshtrivedi closed 4 months ago
Cross-posted this to GeminiAI organization's repo: https://github.com/google-gemini/generative-ai-python/issues/381
I think only @koverholt can clear up this whole confusion.
Hi @nileshtrivedi!
Thanks for opening this issue. You are correct that there are many different references to Gemini
and the Gemini API
in AI Studio, Vertex AI, and other Google and Google Cloud products. The SQL Talk sample app in its current form in this repo is using Vertex AI, which all of the code samples in this repo are scoped to.
It should be possible for you to take the concepts and structure of the SQL Talk app and rework it to use the Gemini API in AI Studio. The SDK for the Gemini API in AI Studio has FunctionDeclarations as part of its lower-level API, and you can also find methods for tools
, Part
, etc. in the API documentation and code samples.
And we're always looking for ways to improve the experience for users working with both AI Studio and Vertex AI, in fact you might enjoy this session from Google I/O from my colleague related to The Gemini API: From prototype to production that talks about moving between AI Studio and Vertex AI in scenarios like this.
Description of the Bug:
SQLTalk, a sample Streamlit app demonstrating Vertex AI's function calling with BigQuery was recently shared by Google: Video, Tutorial, Code, Live demo.
Even though the code lives in Gemini directory (see the full path), it is actually using Vertex AI SDK, not Gemini SDK. The Github page actually says that this repo is for Vertex AI:
But, the Tutorial and Video mention Gemini AI, not Vertex AI.
In summary, A sample app, which was branded as Gemini AI in the video and docs , is actually using vertexai SDK but is present under "gemini" folder in a repo that is for VertexAI only.
Describe the solution you'd like
Provide a version of SQLTalk app that uses Gemini SDK, not VertexAI SDK;
This is not a simple matter of renaming
vertexai.generative_models
togoogle.generativeai
because there are subtle differences in both the SDKs.While this line from SQLTalk app sample code works fine:
This fails:
because the GeminiSDK does not have
FunctionDeclaration
,Part
andTool
but does haveGenerativeModel
.To someone new to GeminiAI/VertexAI, all this is highly confusing.
Describe alternatives you've considered
No response
Additional context
No response
Code of Conduct