feat(openai): chat templates and complete control of prompt generation (#725)

* feat(openai): chat templates and complete control of prompt generation

Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>

* fix: correctly use base chat templates

Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>

* fix: remove symlink

Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>

---------

Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
Aaron Pham
2023-11-22 06:49:14 -05:00
committed by GitHub
parent 7aa0918a6f
commit b28b5269b5
11 changed files with 146 additions and 316 deletions

View File

@@ -64,17 +64,15 @@ requestBody:
one-shot:
summary: One-shot input example
value:
messages:
- role: system
content: You are a helpful assistant.
- role: user
content: Hello, I'm looking for a chatbot that can help me with my work.
messages: __chat_messages__
model: __model_id__
max_tokens: 256
temperature: 0.7
top_p: 0.43
n: 1
stream: false
chat_template: __chat_template__
add_generation_prompt: __add_generation_prompt__
streaming:
summary: Streaming input example
value:
@@ -92,6 +90,8 @@ requestBody:
stop:
- "\\n"
- "<|endoftext|>"
chat_template: __chat_template__
add_generation_prompt: __add_generation_prompt__
schema:
$ref: '#/components/schemas/ChatCompletionRequest'
responses: