feat: filter outlet & libretranslate example

This commit is contained in:
Timothy J. Baek
2024-05-30 02:04:07 -07:00
parent 95ed193ef7
commit 2e934304cf
3 changed files with 158 additions and 3 deletions

View File

@@ -526,7 +526,7 @@ async def filter_outlet(pipeline_id: str, form_data: FilterForm):
@app.post("/v1/chat/completions")
@app.post("/chat/completions")
async def generate_openai_chat_completion(form_data: OpenAIChatCompletionForm):
user_message = get_last_user_message(form_data.messages)
user_message = get_last_user_message(form_data.messages.model_dump())
messages = [message.model_dump() for message in form_data.messages]
if (