Skip to content

Commit

Permalink
Hotfix openai type back to regular (azure has low rate limits)
Browse files Browse the repository at this point in the history
  • Loading branch information
KastanDay committed Mar 29, 2024
1 parent da2e82a commit b50ae9c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions ai_ta_backend/service/nomic_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,13 +620,10 @@ def data_prep_for_convo_map(self, df: pd.DataFrame):
#print("Metadata row:", meta_row)
metadata.append(meta_row)

embeddings_model = OpenAIEmbeddings(
model='text-embedding-ada-002',
openai_api_base=os.environ["AZURE_OPENAI_ENDPOINT"],
openai_api_type=os.environ['OPENAI_API_TYPE'],
openai_api_key=os.environ["AZURE_OPENAI_KEY"],
openai_api_version=os.environ["OPENAI_API_VERSION"],
)
embeddings_model = OpenAIEmbeddings(openai_api_type="openai",
openai_api_base="https://api.openai.com/v1/",
openai_api_key=os.environ['VLADS_OPENAI_KEY'],
openai_api_version="2020-11-07")
embeddings = embeddings_model.embed_documents(user_queries)

metadata = pd.DataFrame(metadata)
Expand Down

0 comments on commit b50ae9c

Please sign in to comment.