Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: missing model name in response; 404 for model not found #6

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
}