Skip to content

Commit

Permalink
fix: missing model name in response; 404 for model not found (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
nirga authored Nov 12, 2024
1 parent b0900f4 commit dad45aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/models/chat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ pub struct ChatCompletionResponse {
pub id: String,
pub object: String,
pub created: u64,
pub model: String,
pub choices: Vec<ChatCompletionChoice>,
pub usage: Usage,
}
Expand Down
6 changes: 3 additions & 3 deletions src/pipelines/pipeline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub async fn chat_completions(
}
}

Err(StatusCode::SERVICE_UNAVAILABLE)
Err(StatusCode::NOT_FOUND)
}

pub async fn completions(
Expand All @@ -71,7 +71,7 @@ pub async fn completions(
}
}

Err(StatusCode::SERVICE_UNAVAILABLE)
Err(StatusCode::NOT_FOUND)
}

pub async fn embeddings(
Expand All @@ -89,5 +89,5 @@ pub async fn embeddings(
}
}

Err(StatusCode::SERVICE_UNAVAILABLE)
Err(StatusCode::NOT_FOUND)
}

0 comments on commit dad45aa

Please sign in to comment.