Update dependency and move to gpt-4-turbo

This commit is contained in:
Vineeth Voruganti 2023-12-12 17:39:34 -05:00
parent fe399239d4
commit 9409bbc24e
4 changed files with 870 additions and 802 deletions

2
.gitignore vendored
View File

@ -158,3 +158,5 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.DS_Store

View File

@ -3,7 +3,7 @@ from langchain.schema import Document
from langchain.schema.messages import BaseMessage, _message_to_dict, messages_from_dict
from langchain.vectorstores import SupabaseVectorStore
from langchain.embeddings.base import Embeddings
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.embeddings import AzureOpenAIEmbeddings
import uuid
import sentry_sdk
import os
@ -24,11 +24,9 @@ class SupabaseMediator:
self.conversation_table = os.environ["CONVERSATION_TABLE"]
self.match_function = os.environ["MATCH_FUNCTION"]
embeddings = OpenAIEmbeddings(
embeddings = AzureOpenAIEmbeddings(
deployment=os.environ["OPENAI_API_EMBEDDING_NAME"],
model="text-embedding-ada-002",
openai_api_base=os.environ["OPENAI_API_BASE"],
openai_api_type=os.environ["OPENAI_API_TYPE"],
)
self.vector_table = SupabaseVectorStore(
embedding=embeddings,

1660
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -9,10 +9,10 @@ readme = "README.md"
[tool.poetry.dependencies]
python = "^3.9"
fastapi = "^0.103.1"
langchain = "^0.0.285"
langchain = "~0.0.3"
supabase = "^1.0.4"
tiktoken = "^0.4.0"
openai = "^0.28.0"
openai = "^1.3.8"
pydantic = "^2.3.0"
python-dotenv = "^1.0.0"
uvicorn = "^0.23.2"