Class: GeminiSession
Gemini Session to manage the connection to the Gemini API
Implements
IGeminiSession
Constructors
new GeminiSession()
new GeminiSession(
options
):GeminiSession
Parameters
• options: GoogleGeminiSessionOptions
Returns
Defined in
packages/llamaindex/src/llm/gemini/base.ts:90
Methods
getChatStream()
getChatStream(
result
):GeminiChatStreamResponse
Parameters
• result: GenerateContentStreamResult
Returns
GeminiChatStreamResponse
Implementation of
IGeminiSession.getChatStream
Defined in
packages/llamaindex/src/llm/gemini/base.ts:124
getCompletionStream()
getCompletionStream(
result
):AsyncIterable
<CompletionResponse
,any
,any
>
Parameters
• result: GenerateContentStreamResult
Returns
AsyncIterable
<CompletionResponse
, any
, any
>
Implementation of
IGeminiSession.getCompletionStream
Defined in
packages/llamaindex/src/llm/gemini/base.ts:140
getGenerativeModel()
getGenerativeModel(
metadata
):GenerativeModel
Parameters
• metadata: ModelParams
Returns
GenerativeModel
Implementation of
IGeminiSession.getGenerativeModel
Defined in
packages/llamaindex/src/llm/gemini/base.ts:100
getResponseText()
getResponseText(
response
):string
Parameters
• response: EnhancedGenerateContentResponse
Returns
string
Implementation of
IGeminiSession.getResponseText
Defined in
packages/llamaindex/src/llm/gemini/base.ts:107
getToolsFromResponse()
getToolsFromResponse(
response
):undefined
|ToolCall
[]
Parameters
• response: EnhancedGenerateContentResponse
Returns
undefined
| ToolCall
[]
Implementation of
IGeminiSession.getToolsFromResponse