| 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 | |
| 210 | nlohmann::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 { |
no outgoing calls
no test coverage detected