openai_chat
Send messages to OpenAI's chat completion API using models like GPT-4o, GPT-4o-mini, o1-preview, or o1-mini for AI-powered conversations and responses.
Instructions
Use this tool when a user specifically requests to use one of OpenAI's models (gpt-4o, gpt-4o-mini, o1-preview, o1-mini). This tool sends messages to OpenAI's chat completion API using the specified model.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| messages | Yes | Array of messages to send to the API | |
| model | No | Model to use for completion (gpt-4o, gpt-4o-mini, o1-preview, o1-mini) | gpt-4o |
Input Schema (JSON Schema)
{
"properties": {
"messages": {
"description": "Array of messages to send to the API",
"items": {
"properties": {
"content": {
"description": "Content of the message",
"type": "string"
},
"role": {
"description": "Role of the message sender",
"enum": [
"system",
"user",
"assistant"
],
"type": "string"
}
},
"required": [
"role",
"content"
],
"type": "object"
},
"type": "array"
},
"model": {
"default": "gpt-4o",
"description": "Model to use for completion (gpt-4o, gpt-4o-mini, o1-preview, o1-mini)",
"enum": [
"gpt-4o",
"gpt-4o-mini",
"o1-preview",
"o1-mini"
],
"type": "string"
}
},
"required": [
"messages"
],
"type": "object"
}