char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
d9f918d2d
char/aliceai-t5-moe
1// Chat conversion functions for server (Responses API, Anthropic API, OAI streaming diffs) 2 3#pragma once 4 5#include "chat.h" 6#include "server-common.h" 7#include "server-http.h" 8 9#include "json.h" 10 11// Convert OpenAI Responses API format to OpenAI Chat Completions API format 12json server_chat_convert_responses_to_chatcmpl (const json & body ); 13 14// Convert Anthropic Messages API format to OpenAI Chat Completions API format 15json server_chat_convert_anthropic_to_oai (const json & body ); 16 17// convert OpenAI transcriptions API format to OpenAI Chat Completions API format 18json convert_transcriptions_to_chatcmpl ( 19const json & body , 20const common_chat_templates * tmpls , 21const std ::map < std ::string ,uploaded_file > & in_files , 22std ::vector < raw_buffer > & out_files ); 23 24json server_chat_msg_diff_to_json_oaicompat (const common_chat_msg_diff & diff );