---
title: "对话历史"
method: POST
path: "/v1/agents/conversation"
tags: ["Agent API"]
---

# 对话历史

`POST /v1/agents/conversation`

查询智能体对话历史，现仅支持 `slides_glm_agent` 智能体。点击 **Try it** 按钮可快速试用。

## Request body

- GlmSlideAgentConversationRequest
  - `agent_id` string — 智能体 `ID`
  - `conversation_id` string — 对话 `ID`
  - `custom_variables` object — 自定义参数
    - `include_pdf` boolean — 是否导出 `pdf` 文件
    - `pages` object[] — `Slide` 页信息
      - `position` number — `Slide` 页码
      - `width` number — `Slide` 宽度, 单位: `cm`
      - `height` number — `Slide` 高度, 单位: `cm`

## Response `200`

处理成功

- GlmSlideAgentConversationResponse
  - `conversation_id` string — 对话 `ID`
  - `agent_id` string — 智能体 `ID`
  - `choices` object[] — Agent output.
    - `message` object[]
      - `role` string — 智能体的角色 `role = assistant`
      - `content` object[] — 智能体响应内容
        - `type` string — 响应内容类型：文件下载链接-`file_url`、图片下载链接-`image_url`
        - `tag_cn` string — CN Tag.
        - `tag_en` string — EN Tag.
        - `file_url` string — 如果 `type = file_url`，则这个字段给出文件的具体下载链接
        - `image_url` string — 如果 `type = image_url`，则这个字段给出图片的具体下载链接
  - `error` object
    - `code` string — Error code.
    - `message` string — Error message.

## Other responses

- `default` — 请求失败

---

[API](https://skmtc.net/bigmodel/apis/zhipu-ai-api.md) · [All operations](https://skmtc.net/bigmodel/apis/zhipu-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bigmodel/zhipu-ai-api/versions/37de2d7b73de/schema)
