Skip to main content

Conduct Agent Q&A Dialogue (OpenAI Protocol)

POST 

/v1/aibot/openai/chat/completions

Conduct Agent Q&A Dialogue (OpenAI Protocol)

Request

Body

required
    model stringrequired

    Agent ID

    messages object[]required

    Messages

  • Array [
  • role stringrequired

    Role of historical information

    content stringrequired

    Content of historical information

  • ]
  • stream booleanrequired

    Whether to return in stream mode

Responses

When the Agent dialogue is successful, non-streaming return

Response Headers
  • X-Request-Id string

    Request ID

Schema
    id string

    Conversation record ID

    object string

    Interface type

    created number

    Conversation timestamp

    model string

    Agent ID

    choices undefined[]

    choices

  • Array [
  • index number

    index

    message object
    role string

    Message type

    content string

    Message content

    finish_reason string

    Conversation end flag; 'continue' indicates the conversation is ongoing, 'stop' indicates the conversation has ended

  • ]
  • usage object

    token usage

    prompt_tokens number

    Indicates the number of tokens in the prompt, remains unchanged across multiple responses

    completion_tokens number

    Total tokens in the response. In streaming responses, represents the cumulative total of all completion tokens up to now, continues to accumulate across multiple responses

    total_tokens number

    Represents the sum of prompt_tokens and completion_tokens

Loading...