genai-stack icon indicating copy to clipboard operation
genai-stack copied to clipboard

401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs

Open JoneyXiao opened this issue 2 years ago • 5 comments

Hi, I am experiencing this error when using App 1 - Support Agent Bot

genai-stack-bot-1 | 2023-10-09 16:20:10.140 Embedding: Using SentenceTransformer genai-stack-bot-1 | 2023-10-09 16:20:11.748 LLM: Using Ollama: llama2 genai-stack-bot-1 | 2023-10-09 16:21:05.271 Embedding: Using SentenceTransformer genai-stack-bot-1 | 2023-10-09 16:21:05.472 LLM: Using Ollama: llama2 genai-stack-bot-1 | Failed to post https://api.smith.langchain.com/runs in LangSmith API. 401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs genai-stack-bot-1 | {"detail":"Invalid auth"} genai-stack-bot-1 | 2023-10-09 16:21:33.497 Embedding: Using SentenceTransformer genai-stack-bot-1 | 2023-10-09 16:21:33.513 LLM: Using Ollama: llama2 genai-stack-bot-1 | Failed to patch https://api.smith.langchain.com/runs/aa5497ad-6d58-4cbe-8a93-78acfa487f90 in LangSmith API. 401 Client Error: Unauthorized for url: https://api.smith.langchain.com/runs/aa5497ad-6d58-4cbe-8a93-78acfa487f90 genai-stack-bot-1 | {"detail":"Invalid auth"}

This is my .env file:

#OPENAI_API_KEY=sk-... #OLLAMA_BASE_URL=http://host.docker.internal:11434 #NEO4J_URI=neo4j://localhost:7687 #NEO4J_USERNAME=neo4j #NEO4J_PASSWORD=password LLM=llama2 #or any Ollama model tag, or gpt-4 or gpt-3.5 EMBEDDING_MODEL=sentence_transformer #or openai or ollama

LANGCHAIN_ENDPOINT="https://api.smith.langchain.com" LANGCHAIN_TRACING_V2=true # false LANGCHAIN_PROJECT=#your-project-name LANGCHAIN_API_KEY=#your-api-key ls_...

I don't have LANGCHAIN_API_KEY in my case, it would be nice if the readme had more explanations of these variables, if they are mandatory to have values, etc.

JoneyXiao avatar Oct 10 '23 10:10 JoneyXiao

Agreed, I've been on a waiting list and it will be nice to use it with local resources

mdf-ido avatar Oct 11 '23 01:10 mdf-ido

yes .. facing the same issue

AmmarFahmy avatar Oct 13 '23 16:10 AmmarFahmy

Hmm we should not connect to langsmith if there are no project or token configured. @nfcampos ?

If you watch our talk from DockerCon, Harrison shared a code for early LangSmith access. :)

Keynote: https://www.dockercon.com/2023/v/s-1792335?i=dhp8fMM4xkSI0gKboqyihvf4F0MWZKeY GenAI Stack: https://www.dockercon.com/2023/v/s-1792336?i=dhp8fMM4xkSI0gKboqyihvf4F0MWZKeY

jexp avatar Oct 20 '23 17:10 jexp

In the waitlist of Langsmith for some time but still not approved yet. I think that becomes a blocker of using GenAI.

yauri-io avatar Oct 26 '23 05:10 yauri-io

LangSmith is optional and not required to run GenAI stack.

tomasonjo avatar Oct 26 '23 06:10 tomasonjo