Skip to content

Commit

Permalink
Add support for LangSmith
Browse files Browse the repository at this point in the history
  • Loading branch information
tractorjuice committed May 18, 2024
1 parent 8b09011 commit f994188
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 9 additions & 1 deletion app_faiss.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
#MODEL = "gpt-3.5-turbo-1106" # 16K, Sept 2021. New Updated GPT 3.5 Turbo. The latest GPT-3.5 Turbo model with improved instruction following, JSON mode, reproducible outputs, parallel function calling, and more. Returns a maximum of 4,096 output tokens.
MODEL = "gpt-4o"

# Set API keys
PINECONE_INDEX_NAME = st.secrets["PINECONE_INDEX_NAME"]

os.environ["LANGCHAIN_TRACING_V2"] = "true"
os.environ["LANGCHAIN_ENDPOINT"] = "https://api.smith.langchain.com"
os.environ["LANGCHAIN_PROJECT"] = st.secrets["LANGCHAIN_PROJECT"]
os.environ["LANGCHAIN_API_KEY"] = st.secrets["LANGCHAIN_API_KEY"]

if "session_id" not in st.session_state:
st.session_state.session_id = str(uuid.uuid4())

Expand Down Expand Up @@ -87,7 +95,7 @@
llm=st.session_state.llm,
retriever=st.session_state.vector_store.as_retriever(
search_kwargs={
"k": 20,
"k": 10,
#"score_threshold": .95,
}
),
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ pinecone-client
tiktoken
streamlit
faiss-cpu
promptlayer

0 comments on commit f994188

Please sign in to comment.