Download tools/server/server-chat.h from Parakon/parakon-runtime: direct link, hf CLI and curl.
- Browser
- Download file 853 Bytes
-
https://huggingface.co/Parakon/parakon-runtime/resolve/main/tools/server/server-chat.h
- Command line
-
hf download hf://Parakon/parakon-runtime/tools/server/server-chat.h
-
curl -L -o server-chat.h https://huggingface.co/Parakon/parakon-runtime/resolve/main/tools/server/server-chat.h
853 Bytes
| // Chat conversion functions for server (Responses API, Anthropic API, OAI streaming diffs) | |
| // Convert OpenAI Responses API format to OpenAI Chat Completions API format | |
| json server_chat_convert_responses_to_chatcmpl(const json & body); | |
| // Convert Anthropic Messages API format to OpenAI Chat Completions API format | |
| json server_chat_convert_anthropic_to_oai(const json & body); | |
| // convert OpenAI transcriptions API format to OpenAI Chat Completions API format | |
| json convert_transcriptions_to_chatcmpl( | |
| const json & body, | |
| const common_chat_templates * tmpls, | |
| const std::map<std::string, uploaded_file> & in_files, | |
| std::vector<raw_buffer> & out_files); | |
| json server_chat_msg_diff_to_json_oaicompat(const common_chat_msg_diff & diff); | |