mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-24 00:09:02 +00:00
Templating: Add generation prompt appending
Append generation prompts if given the flag on an OAI chat completion request. This appends the "assistant" message to the instruct prompt. Defaults to true since this is intended behavior. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -26,6 +26,7 @@ class ChatCompletionRequest(CommonCompletionRequest):
|
||||
# Take in a string as well even though it's not part of the OAI spec
|
||||
messages: Union[str, List[Dict[str, str]]]
|
||||
prompt_template: Optional[str] = None
|
||||
add_generation_prompt: Optional[bool] = True
|
||||
|
||||
class ChatCompletionResponse(BaseModel):
|
||||
id: str = Field(default_factory=lambda: f"chatcmpl-{uuid4().hex}")
|
||||
|
||||
Reference in New Issue
Block a user