mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-25 00:39:10 +00:00
OAI: Strictly type chat completions
Previously, the messages were a list of dicts. These are untyped and don't provide strict hinting. Add types for chat completion messages and reformat existing code. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -132,6 +132,7 @@ async def chat_completion_request(
|
||||
else:
|
||||
if model.container.use_vision:
|
||||
data.messages, embeddings = await preprocess_vision_request(data.messages)
|
||||
|
||||
prompt = await format_prompt_with_template(data)
|
||||
|
||||
# Set an empty JSON schema if the request wants a JSON response
|
||||
|
||||
Reference in New Issue
Block a user