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
201httplib::Headers OpenAIRequestBuilder::build_headers(
202 const providers::ProviderConfig& config) {
203 httplib::Headers headers = {
204 {config.auth_header_name, config.auth_header_prefix + config.api_key}};
205
206 // Add any extra headers
207 for (const auto& [key, value] : config.extra_headers) {
208 headers.emplace(key, value);
209 }
210
211 // Note: Content-Type is passed separately to httplib::Post() as content_type
212 // parameter
213 return headers;
214}
215
216} // namespace openai
217} // namespace ai

Callers 3

embeddingsMethod · 0.45
stream_textMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected