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

feat: create models endpoint #105

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion backends/vllm/src/tests/llama.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::models::llama::LlamaModel;
use crate::{
llm_service::LlmService,
types::{GenerateParameters, GenerateRequest},
};
use crate::models::llama::LlamaModel;
use futures::{stream::FuturesUnordered, StreamExt};
use std::{path::PathBuf, time::Instant};
use tracing::info;
Expand Down
13 changes: 13 additions & 0 deletions server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,19 @@ pub struct AppState {
llm_service_sender: UnboundedSender<(GenerateRequest, oneshot::Sender<GenerateRequestOutput>)>,
shutdown_signal_sender: mpsc::Sender<()>,
}
#[derive(Debug, Serialize, Deserialize)]
struct Model {
id: String,
object: String,
created: i64,
owned_by: String,
}

#[derive(Serialize)]
struct ModelList {
object: String,
data: Vec<Model>,
}

#[tokio::main]
async fn main() -> anyhow::Result<()> {
Expand Down
Loading