imoneoi / openchat

OpenChat: Advancing Open-source Language Models with Imperfect Data
https://openchat.team
Apache License 2.0
5.12k stars 389 forks source link

Do I need to handle the chat history when using the curl example? #40

Open zhan0903 opened 11 months ago

zhan0903 commented 11 months ago

When I use the curl http://localhost:18888/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "openchat_v3.2", "messages": [{"role": "user", "content": "You are a large language model named OpenChat. Write a poem to describe yourself"}] }', how do I let the model remember the chat history or the context?

imoneoi commented 10 months ago

The format for chat history is same as OpenAI API.

https://platform.openai.com/docs/api-reference/chat