mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-15 00:07:28 +00:00
OAI: Allow /v1/encode endpoint to handle vision requests
* More robust checks for OAI chat completion message lists on /v1/encode endpoint * Added TODO to support other aspects of chat completions * Fix oversight where embeddings was not defined in advance on /v1/chat/completions endpoint
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import asyncio
|
||||
from common.multimodal import MultimodalEmbeddingWrapper
|
||||
from fastapi import APIRouter, Depends, HTTPException, Request
|
||||
from sse_starlette import EventSourceResponse
|
||||
from sys import maxsize
|
||||
@@ -124,6 +125,8 @@ async def chat_completion_request(
|
||||
|
||||
model_path = model.container.model_dir
|
||||
|
||||
embeddings = MultimodalEmbeddingWrapper()
|
||||
|
||||
if isinstance(data.messages, str):
|
||||
prompt = data.messages
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user