---
title: "AI50 Patent Large Model(Pat GPT)"
method: POST
path: "/chat/pat-gpt-stream"
tags: ["Patsnap LLM"]
---

# AI50 Patent Large Model(Pat GPT)

`POST /chat/pat-gpt-stream`

## Request

- Base URL: `https://connect.patsnap.com`
- URL: `https://connect.patsnap.com/chat/pat-gpt-stream`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/patsnap/apis/patsnap-open-platform-api/docs/chat/pat-gpt-stream/post.ts> (a function with typed inputs; its response is checked against the schema)

It supports inputting technical questions or questions related to patents. The Patent Large Model (Pat GPT) aims to intelligently retrieve, analyze, and mine data in response to the posed questions, providing relevant patent information, trend analysis, and technical evaluations.

## Request body `text/event-stream`

- AI50ChatPatGptStreamRequest
  - `query` string, required: User question Note: No more than 30000 character.
  - `stream` boolean: When the interface returns results, whether to require streaming response: true: Represents needed false: Represents not needed Default value is true.

## Response `200`

Successful ai50 patent large model(pat gpt) response.

- AI50ChatPatGptStreamResponse
  - `data` AI50ChatPatGptStreamAiPatGptResponse
    - `output` AI50ChatPatGptStreamAiPatGptOutPut
      - `usage` AI50ChatPatGptStreamAiPatGptUsage
        - `input_tokens` integer: The length of the user's question after tokenization.
        - `total_tokens` integer: The total length of tokens consumed after the model invocation is complete.
        - `output_tokens` integer: The length of the text generated by the model after tokenization.
      - `status` string: Model Return Status Note: When status = "running", the system is outputting via SSE, When status = "finished", the request has ended, When status = "length", the generated content exceeds the model's maximum length.
      - `content` string: Conversation result
    - `references` AI50ChatPatGptStreamAiPatGptReference[]: Reference materials for model output results.
      - `text` string: Introduction to reference materials
      - `type` string: Types of reference materials include patent (专利), paper (文献), and website (网页).
      - `value` string: Reference material associated ID, 1) When type is 'patent', the value is 'patent_id' 2) When type is 'paper', the value is 'paper_id' 3) When type is 'website', the value is the 'url-link'
  - `status` boolean, required: Status
  - `error_msg` string: Error Message
  - `error_code` integer, required: Error Code

---

[API](https://skmtc.dev/patsnap/apis/patsnap-open-platform-api.md) - [All operations](https://skmtc.dev/patsnap/apis/patsnap-open-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/patsnap/apis/patsnap-open-platform-api/revisions/c2264a0de595?raw)
