| 199 | } |
| 200 | |
| 201 | httplib::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 |
no outgoing calls
no test coverage detected