gabykim commited on
Commit
eede10d
·
1 Parent(s): 028eb6e

[BugFix] ollama batch embeding

Browse files
src/know_lang_bot/models/embeddings.py CHANGED
@@ -8,9 +8,8 @@ EmbeddingVector = List[float]
8
 
9
  def _process_ollama_batch(inputs: List[str], model_name: str) -> List[EmbeddingVector]:
10
  """Helper function to process Ollama embeddings in batch."""
11
- return [
12
- ollama.embed(model=model_name, input=inputs)['embeddings']
13
- ]
14
 
15
  def _process_openai_batch(inputs: List[str], model_name: str) -> List[EmbeddingVector]:
16
  """Helper function to process OpenAI embeddings in batch."""
 
8
 
9
  def _process_ollama_batch(inputs: List[str], model_name: str) -> List[EmbeddingVector]:
10
  """Helper function to process Ollama embeddings in batch."""
11
+ return ollama.embed(model=model_name, input=inputs)['embeddings']
12
+
 
13
 
14
  def _process_openai_batch(inputs: List[str], model_name: str) -> List[EmbeddingVector]:
15
  """Helper function to process OpenAI embeddings in batch."""