Skip to content

Commit

Permalink
chore: use openai/embedding and openai/chat for consistent naming pra…
Browse files Browse the repository at this point in the history
…ctices (#2291)
  • Loading branch information
wsxiaoys authored May 30, 2024
1 parent 2984816 commit a6c5799
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/http-api-bindings/src/chat/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use tabby_inference::ChatCompletionStream;

pub async fn create(model: &HttpModelConfig) -> Arc<dyn ChatCompletionStream> {
match model.kind.as_str() {
"openai-chat" => Arc::new(OpenAIChatEngine::create(
"openai/chat" => Arc::new(OpenAIChatEngine::create(
&model.api_endpoint,
model.model_name.as_deref().unwrap_or_default(),
model.api_key.clone(),
Expand Down
2 changes: 1 addition & 1 deletion crates/http-api-bindings/src/embedding/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub async fn create(config: &HttpModelConfig) -> Arc<dyn Embedding> {
let engine = LlamaCppEngine::create(&config.api_endpoint, config.api_key.clone());
Arc::new(engine)
}
"openai-embedding" => {
"openai/embedding" => {
let engine = OpenAIEmbeddingEngine::create(
&config.api_endpoint,
config.model_name.as_deref().unwrap_or_default(),
Expand Down

0 comments on commit a6c5799

Please sign in to comment.