(base_url: Option<&str>, path: &str)
| 203 | } |
| 204 | |
| 205 | fn responses_url(base_url: Option<&str>, path: &str) -> String { |
| 206 | let path = path.trim_start_matches('/'); |
| 207 | match base_url { |
| 208 | None => format!("https://api.githubcopilot.com/{}", path), |
| 209 | Some(base) => { |
| 210 | if base.ends_with("/chat/completions") { |
| 211 | return format!("{}/{}", base.trim_end_matches("/chat/completions"), path); |
| 212 | } |
| 213 | if base.ends_with('/') { |
| 214 | format!("{}{}", base, path) |
| 215 | } else { |
| 216 | format!("{}/{}", base, path) |
| 217 | } |
| 218 | } |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | fn extract_responses_provider_options( |
| 223 | provider_options: Option<&HashMap<String, serde_json::Value>>, |
nothing calls this directly
no outgoing calls
no test coverage detected