google / Exports / GoogleProvider
Class: GoogleProvider
Google AI provider implementation
Implements
unknown
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new GoogleProvider(options
): GoogleProvider
Parameters
Name | Type |
---|---|
options | GoogleProviderOptions |
Returns
Defined in
Properties
name
• name: string
= 'google'
Provider name
Defined in
options
• options: GoogleProviderOptions
Provider options
Defined in
Methods
chat
▸ chat(model
, context
, options?
): Promise
<ModelResponse
>
Send request to model with given context and receive response.
Parameters
Name | Type |
---|---|
model | string |
context | Context |
options? | any |
Returns
Promise
<ModelResponse
>
Defined in
chatStream
▸ chatStream(model
, context
, options?
): AsyncGenerator
<StreamingResponseChunk
, void
, unknown
>
Send streaming request to model with given context and receive response chunks.
Parameters
Name | Type |
---|---|
model | string |
context | Context |
options? | any |
Returns
AsyncGenerator
<StreamingResponseChunk
, void
, unknown
>
Defined in
formatFunctions
▸ formatFunctions(_functions
): unknown
Format function definitions into a format the model can understand.
Parameters
Name | Type |
---|---|
_functions | FunctionDefinition [] |
Returns
unknown
Defined in
parseResponse
▸ parseResponse(response
): ModelResponse
Parse model response into standard format.
Parameters
Name | Type |
---|---|
response | any |
Returns
ModelResponse
Defined in
parseStreamingChunk
▸ parseStreamingChunk(chunk
): StreamingResponseChunk
Parse streaming response chunk into standard format.
Parameters
Name | Type |
---|---|
chunk | any |
Returns
StreamingResponseChunk
Defined in
close
▸ close(): Promise
<void
>
리소스 해제 (필요시)
Returns
Promise
<void
>