소스 검색

Added message format for chat api (#1488)

pepperoni21 1 년 전
부모
커밋
e3b090dbc5
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      docs/api.md

+ 4 - 0
docs/api.md

@@ -304,6 +304,10 @@ Generate the next message in a chat with a provided model. This is a streaming e
 - `model`: (required) the [model name](#model-names)
 - `messages`: the messages of the chat, this can be used to keep a chat memory
 
+  A message is an object with the following fields:
+  - `role`: the role of the message, either `user`, `assistant` or `system`
+  - `content`: the content of the message
+
 Advanced parameters (optional):
 
 - `format`: the format to return a response in. Currently the only accepted value is `json`