toasted1920 commited on
Commit
cfc936f
·
1 Parent(s): d3ae5ba

fix embedding model name

Browse files
Files changed (1) hide show
  1. back_end/core/embeddings.py +2 -2
back_end/core/embeddings.py CHANGED
@@ -61,7 +61,7 @@ def _get_embedding_function():
61
  result = []
62
  for text in texts:
63
  response = genai.embed_content(
64
- model="models/text-embedding-004",
65
  content=text
66
  )
67
  result.append(response['embedding'])
@@ -70,7 +70,7 @@ def _get_embedding_function():
70
  def embed_query(self, text):
71
  genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
72
  response = genai.embed_content(
73
- model="models/text-embedding-004",
74
  content=text
75
  )
76
  return response['embedding']
 
61
  result = []
62
  for text in texts:
63
  response = genai.embed_content(
64
+ model="models/embedding-001",
65
  content=text
66
  )
67
  result.append(response['embedding'])
 
70
  def embed_query(self, text):
71
  genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
72
  response = genai.embed_content(
73
+ model="models/embedding-001",
74
  content=text
75
  )
76
  return response['embedding']