Chat
POST
https://api.cometapi.com/v1/chat/completions
Maintainer:Not configured
POST https://api.cometapi.com/v1/chat/completions
is used to send a request to generate chat completions. The request should include a model
parameter specifying the model to use, a list of messages
containing the role and content of the messages, and a stream
parameter to indicate whether to stream the response.Request Body
model
(string): Specifies the model to use for generating completions.messages
(array): Contains the role and content of the messages for which completions are to be generated.role
(string): Specifies the role of the message (e.g., "user", "assistant", "system").content
(string): The content of the message for which completions are to be generated.stream
(boolean): Indicates whether to stream the response.Request
Header Params
Authorization
string
required
Example:
Bearer {{api-key}}
Body Params application/json