ChatCompletionsAPIClientParameters
OpenAI.ChatCompletionsAPIClient parameters. Can be passed as arguments to the OpenAI.createChatCompletionsAPIClient method.
Props
apiKey: string
API key for the OpenAI API.
baseUrl: string
Optional. Base URL to connect an OpenAI-compatible connector (for example, Azure).
privacy: boolean
Optional. Whether to enable the privacy functionality.
If privacy is enabled, the logging for the WebSocket connection is disabled.
NOTE: the default value is false.
project: string
Optional. Project for the OpenAI API.
statistics: boolean
Optional. Enables statistics functionality.
storeContext: boolean
Optional. Whether to store the context in the client. The default value is false.
summaryModel: string
Optional. Model for the summary generation. The default value is gpt-4o.
summaryPrompt: string
Optional. Prompt for the summary generation. If not specified, the default prompt is used. The API Client automatically inserts the previous summary here. The default prompt is:
You are maintaining a running summary of an ongoing conversation.
Below is:
1. The previous summary
2. The messages between user and assistant you need to summarize
Provide a summary to reflect the information.
### Instructions:
- Preserve important existing context from the previous summary
- Integrate new key information, decisions, and developments
- Remove outdated or redundant details
- Avoid repeating unchanged information
- Keep the summary concise and context-efficient
- Maintain a neutral and factual tone
trace: boolean
Optional. Whether to enable the tracing functionality.
If tracing is enabled, a URL to the trace file appears in the 'websocket.created' message. The file contains all sent and received WebSocket messages in the plain text format. The file is uploaded to the S3 storage.
NOTE: enable this only for diagnostic purposes. You can provide the trace file to our support team to help investigate issues.