Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to batch ingest runs: LangSmithError("Failed to post .../runs/batch in LangSmith API. Invalid URL '.../runs/batch': No scheme supplied. Perhaps you meant https://.../runs/batch?\n") #528

Open
dds-normous opened this issue Mar 17, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@dds-normous
Copy link

Hi,
I am having this issue with a URL API call to LangSmith API.
Here is some of the terminal results (which repeats every 180 seconds).

Checking for new emails
Failed to batch ingest runs: LangSmithError("Failed to post .../runs/batch in LangSmith API. Invalid URL '.../runs/batch': No scheme supplied. Perhaps you meant https://.../runs/batch?\n")

No new emails
Waiting for 180 seconds
Failed to batch ingest runs: LangSmithError("Failed to post .../runs/batch in LangSmith API. Invalid URL '.../runs/batch': No scheme supplied. Perhaps you meant https://.../runs/batch?\n")

I had chatgpt check the .py files of the application, and it can't locate the possible URL issue.
It's response was:

Understanding the Error
Invalid URL: The program is trying to make a web request to an API endpoint, but the URL it's using is incomplete or malformed because it lacks the scheme (http:// or https://).
LangSmithError: This is a custom error, likely defined in your CrewAI application or a dependency, indicating an issue specifically with LangSmith API interactions.
Suggested Fix: The error message even hints at a possible solution: ensuring the URL starts with https://.

Thanks for your help!

@dds-normous
Copy link
Author

As a follow-up, I am running crewAI's example of the gmail inbox management within the CrewAI-LangGraph folder.

@hinthornw
Copy link
Collaborator

hinthornw commented Mar 19, 2024

It looks like you have a misconfigured env var. Something like:

LANGCHAIN_ENDPOINT="..."

Or something similar?

Can check with

langsmith.env.get_langchain_env_vars()

@sorydi3
Copy link

sorydi3 commented Mar 20, 2024

I'm having the same issue as well.

I have the following variables in my .env file
LANGCHAIN_TRACING_V2="true" LANGCHAIN_API_KEY="ls__xxxdxxxxx555096736" LANGCHAIN_ENDPOINT= "https://api.smith.langchain.com"

and this is the error I'm getting back.

image

it say that the key is invalid , and have literally copied the key from the langsmith site and pasted to my .env file.

@dds-normous
Copy link
Author

Hi,
Thanks for all the replies. I am using the crewAI-examples, specifically the CrewAI- LangGraph program that checks for new gmails and write email reply drafts.
https://github.com/joaomdmoura/crewAI-examples.git

I didn't enter any of the optional Langchain .env items, but entered my OpenAI and Tavily API keys.

Optional

LANGCHAIN_TRACING_V2=...
LANGCHAIN_ENDPOINT=...
LANGCHAIN_API_KEY=...
LANGCHAIN_PROJECT=...

I was setting up and running the program based on this youtube video:
I use AI Agents to Respond to my Emails. Integrate CrewAI + LangGraph
https://www.youtube.com/watch?v=0SYyxNHlAWQ&t=261s

@hinthornw hinthornw added the bug Something isn't working label Apr 10, 2024
@AbubakrChan
Copy link

did you found any solution yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants