Skip to content

Commit 0867c71

Browse files
authored
Merge pull request #99 from Feng-Jay/main
2 parents 0eca58b + e511245 commit 0867c71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/providers/openai_compatible.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ impl<T: OpenAIProviderConfig> OpenAICompatibleProvider<T> {
327327
};
328328
Self {
329329
api_key: api_key.into(),
330-
base_url: Url::parse(&base_url.unwrap_or_else(|| T::DEFAULT_BASE_URL.to_owned()))
330+
base_url: Url::parse(&format!("{}/", base_url.unwrap_or_else(|| T::DEFAULT_BASE_URL.to_owned()).trim_end_matches("/")))
331331
.expect("Failed to parse base URL"),
332332
model: model.unwrap_or_else(|| T::DEFAULT_MODEL.to_string()),
333333
max_tokens,

0 commit comments

Comments
 (0)