MCPcopy Create free account
hub / github.com/ClickHouse/ai-sdk-cpp / build_headers

Method build_headers

src/providers/openai/openai_request_builder.cpp:201–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199 }
200
201 ai::logger::log_debug("Added {} tools with choice: {}",
202 tools_array.size(),
203 options.tool_choice.to_string());
204 }
205 }
206
207 return request;
208}
209
210nlohmann::json OpenAIRequestBuilder::build_request_json(
211 const EmbeddingOptions& options) {
212 nlohmann::json request{{"model", options.model}, {"input", options.input}};
213
214 // Set encoding format (default to float for compatibility)
215 if (options.encoding_format) {
216 request["encoding_format"] = options.encoding_format.value();
217 } else {

Callers 3

embeddingsMethod · 0.45
stream_textMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected