Apply rate limits in LLM service (#15997)
Release Notes: - N/A --------- Co-authored-by: Marshall <marshall@zed.dev> Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
parent
2bc503771b
commit
06625bfe94
21 changed files with 983 additions and 227 deletions
|
@ -52,10 +52,18 @@ async fn main() -> Result<()> {
|
|||
Some("seed") => {
|
||||
let config = envy::from_env::<Config>().expect("error loading config");
|
||||
let db_options = db::ConnectOptions::new(config.database_url.clone());
|
||||
|
||||
let mut db = Database::new(db_options, Executor::Production).await?;
|
||||
db.initialize_notification_kinds().await?;
|
||||
|
||||
collab::seed::seed(&config, &db, true).await?;
|
||||
collab::seed::seed(&config, &db, false).await?;
|
||||
|
||||
if let Some(llm_database_url) = config.llm_database_url.clone() {
|
||||
let db_options = db::ConnectOptions::new(llm_database_url);
|
||||
let mut db = LlmDatabase::new(db_options.clone(), Executor::Production).await?;
|
||||
db.initialize().await?;
|
||||
collab::llm::db::seed_database(&config, &mut db, true).await?;
|
||||
}
|
||||
}
|
||||
Some("serve") => {
|
||||
let mode = match args.next().as_deref() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue