Example
from phi.agent import Agent
from phi.model.vertexai import Gemini
agent = Agent(
model=Gemini(id="gemini-1.5-flash"),
show_tool_calls=True,
markdown=True,
)
agent.print_response("What is the stock price of NVDA and TSLA")
Gemini Params
| Parameter | Type | Default | Description |
|---|---|---|---|
id | str | "gemini-1.5-flash" | The specific model ID used for generating responses. |
name | str | "Gemini" | The name identifier for the agent. |
provider | str | "VertexAI" | The provider of the model. |
function_declarations | Optional[List[FunctionDeclaration]] | - | A list of function declarations that the model can utilize during the response generation process. |
generation_config | Optional[Any] | - | Configuration settings for the generation process, such as parameters for controlling output behavior. |
safety_settings | Optional[Any] | - | Settings related to safety measures, ensuring the generation of appropriate and safe content. |
generative_model_kwargs | Optional[Dict[str, Any]] | - | Additional keyword arguments for the generative model. |
client | Optional[GenerativeModel] | - | A pre-configured instance of the Gemini client. |
VertexAI is a subclass of the Model class and has access to the same params.