File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,9 @@ pub async fn new_llm_embedding_client(
145145 api_config : Option < LlmApiConfig > ,
146146) -> Result < Box < dyn LlmEmbeddingClient > > {
147147 let client = match api_type {
148+ LlmApiType :: Ollama => {
149+ Box :: new ( ollama:: Client :: new ( address) . await ?) as Box < dyn LlmEmbeddingClient >
150+ }
148151 LlmApiType :: Gemini => {
149152 Box :: new ( gemini:: AiStudioClient :: new ( address) ?) as Box < dyn LlmEmbeddingClient >
150153 }
@@ -156,11 +159,7 @@ pub async fn new_llm_embedding_client(
156159 }
157160 LlmApiType :: VertexAi => Box :: new ( gemini:: VertexAiClient :: new ( address, api_config) . await ?)
158161 as Box < dyn LlmEmbeddingClient > ,
159- LlmApiType :: Ollama
160- | LlmApiType :: OpenRouter
161- | LlmApiType :: LiteLlm
162- | LlmApiType :: Vllm
163- | LlmApiType :: Anthropic => {
162+ LlmApiType :: OpenRouter | LlmApiType :: LiteLlm | LlmApiType :: Vllm | LlmApiType :: Anthropic => {
164163 api_bail ! ( "Embedding is not supported for API type {:?}" , api_type)
165164 }
166165 } ;
You can’t perform that action at this time.
0 commit comments