Skip to content
This repository was archived by the owner on Feb 21, 2025. It is now read-only.

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
valaises committed Jan 3, 2024
1 parent 5b4886a commit a730ca1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fetch_embedding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ pub async fn get_embedding(
text: String,
api_key: &String,
) -> Result<Vec<f32>, String> {
match address_url.as_str() {
match address_url.to_lowercase().as_str() {
"hf" => Ok(get_embedding_hf_style(text, endpoint_template, model_name, api_key).await?),
url if url == "Refact" || url.starts_with("http") => {
url if url == "refact" || url.starts_with("http") => {
Ok(get_embedding_openai_style(text, endpoint_template, model_name, api_key).await?)
}
_ => {
Expand Down

0 comments on commit a730ca1

Please sign in to comment.