openai / Exports / OpenAIProvider
Class: OpenAIProvider
OpenAI provider implementation for Robota
Provides integration with OpenAI's GPT models following BaseAIProvider guidelines. Uses OpenAI SDK native types internally for optimal performance and feature support.
Hierarchy
unknown↳
OpenAIProvider
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new OpenAIProvider(options): OpenAIProvider
Parameters
| Name | Type |
|---|---|
options | OpenAIProviderOptions |
Returns
Overrides
BaseAIProvider.constructor
Defined in
Properties
name
• Readonly name: "openai"
Defined in
version
• Readonly version: "1.0.0"
Defined in
Methods
chat
▸ chat(messages, options?): Promise<UniversalMessage>
Generate response using UniversalMessage
Parameters
| Name | Type |
|---|---|
messages | UniversalMessage[] |
options? | any |
Returns
Promise<UniversalMessage>
Defined in
chatStream
▸ chatStream(messages, options?): AsyncIterable<UniversalMessage, any, any>
Generate streaming response using UniversalMessage
Parameters
| Name | Type |
|---|---|
messages | UniversalMessage[] |
options? | any |
Returns
AsyncIterable<UniversalMessage, any, any>
Defined in
supportsTools
▸ supportsTools(): boolean
Returns
boolean
Defined in
validateConfig
▸ validateConfig(): boolean
Returns
boolean
Defined in
dispose
▸ dispose(): Promise<void>
Returns
Promise<void>