Documentation
¶
Overview ¶
Package geminitool provides access to Gemini native tools. You can use any tool from genai with geminitool.New().
For example, to create a Gemini retrieval tool:
geminitool.New("data_retrieval", &genai.Tool{
Retrieval: &genai.Retrieval{
ExternalAPI: &genai.ExternalAPI{
Endpoint: ,
AuthConfig:
},
},
})
Package also provides default tools like GoogleSearch.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GoogleSearch ¶
type GoogleSearch struct{}
GoogleSearch is a built-in tool that is automatically invoked by Gemini 2 models to retrieve search results from Google Search. The tool operates internally within the model and does not require or perform local code execution.
func (GoogleSearch) Description ¶
func (s GoogleSearch) Description() string
Description implements tool.Tool.
func (GoogleSearch) IsLongRunning ¶
func (t GoogleSearch) IsLongRunning() bool
IsLongRunning implements tool.Tool.
func (GoogleSearch) ProcessRequest ¶
func (s GoogleSearch) ProcessRequest(ctx tool.Context, req *model.LLMRequest) error
ProcessRequest adds the GoogleSearch tool to the LLM request.
Click to show internal directories.
Click to hide internal directories.