AG2 home page
Search or ask...
⌘K
ag2ai/ag2
ag2ai/ag2
Search...
Navigation
oai_models
autogen.oai.oai_models.ChatCompletion
Documentation
User Guide
API References
Use Cases
User Stories
Contribute
FAQs
Ecosystem
Blog
API Reference
autogen
Overview
Agent
AgentNameConflictError
AssistantAgent
Cache
ChatResult
ContextExpression
ConversableAgent
GroupChat
GroupChatManager
InvalidCarryOverTypeError
LLMConfig
ModelClient
NoEligibleSpeakerError
OpenAIWrapper
SenderRequiredError
UndefinedNextAgentError
UpdateSystemMessage
UserProxyAgent
a_initiate_swarm_chat
a_run_swarm
config_list_from_dotenv
config_list_from_json
config_list_from_models
config_list_gpt4_gpt35
config_list_openai_aoai
filter_config
gather_usage_summary
get_config_list
initiate_chats
register_function
run_swarm
agentchat
agents
browser_utils
cache
code_utils
coding
doc_utils
events
exception_utils
fast_depends
formatting_utils
graph_utils
import_utils
interop
io
json_utils
llm_config
logger
math_utils
mcp
messages
oai
Overview
AnthropicLLMConfigEntry
AzureOpenAILLMConfigEntry
BedrockLLMConfigEntry
CerebrasLLMConfigEntry
CohereLLMConfigEntry
DeepSeekLLMConfigEntry
GeminiLLMConfigEntry
GroqLLMConfigEntry
MistralLLMConfigEntry
OllamaLLMConfigEntry
OpenAILLMConfigEntry
TogetherLLMConfigEntry
anthropic
bedrock
cerebras
client
client_utils
cohere
gemini
gemini_types
groq
mistral
oai_models
Overview
ChatCompletion
ChatCompletionMessage
ChatCompletionMessageToolCall
Choice
CompletionUsage
chat_completion
chat_completion_audio
chat_completion_message
chat_completion_message_tool_call
chat_completion_token_logprob
completion_usage
ollama
openai_utils
together
retrieve_utils
runtime_logging
token_count_utils
tools
types
On this page
ChatCompletion
Class Attributes
choices
config_id
cost
created
id
message_retrieval_function
model
model_config
object
pass_filter
service_tier
system_fingerprint
usage
oai_models
autogen.oai.oai_models.ChatCompletion
ChatCompletion
Copy
ChatCompletion(
**
data: Any)
!!! abstract “Usage Documentation”
Models
A base class for creating Pydantic models.
Parameters:
Name
Description
**data
Type:
Any
Class Attributes
choices
A list of chat completion choices.
Can be more than one if
n
is greater than 1.
config_id
cost
created
The Unix timestamp (in seconds) of when the chat completion was created.
id
A unique identifier for the chat completion.
message_retrieval_function
model
The model used for the chat completion.
model_config
object
The object type, which is always
chat.completion
.
pass_filter
service_tier
The service tier used for processing the request.
system_fingerprint
This fingerprint represents the backend configuration that the model runs with.
Can be used in conjunction with the
seed
request parameter to understand when backend changes have been made that might impact determinism.
usage
Usage statistics for the completion request.
Overview
ChatCompletionMessage
Assistant
Responses are generated using AI and may contain mistakes.