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:88
Methods
getChatStream()
getChatStream(
result
):GeminiChatStreamResponse
Parameters
• result: GenerateContentStreamResult
Returns
GeminiChatStreamResponse
Implementation of
IGeminiSession.getChatStream
Defined in
packages/llamaindex/src/llm/gemini/base.ts:122
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:138
getGenerativeModel()
getGenerativeModel(
metadata
):GenerativeModel
Parameters
• metadata: ModelParams
Returns
GenerativeModel
Implementation of
IGeminiSession.getGenerativeModel
Defined in
packages/llamaindex/src/llm/gemini/base.ts:98
getResponseText()
getResponseText(
response
):string
Parameters
• response: EnhancedGenerateContentResponse
Returns
string
Implementation of
IGeminiSession.getResponseText
Defined in
packages/llamaindex/src/llm/gemini/base.ts:105
getToolsFromResponse()
getToolsFromResponse(
response
):undefined
|ToolCall
[]
Parameters
• response: EnhancedGenerateContentResponse
Returns
undefined
| ToolCall
[]
Implementation of
IGeminiSession.getToolsFromResponse