Genos
Genos•4mo ago

has anyone ever ocured `httpcore.UnsupportedProtocol: Request URL is missing an 'http://' or 'https

has anyone ever ocured httpcore.UnsupportedProtocol: Request URL is missing an 'http://' or 'https://' protocol. ? suddenly got that error, the version of httpcode i've been using is 1.0.4
17 Replies
Rolex
Rolex•4mo ago
Hey I am using langfuse with langchain integrations. I have a prompt stored in the langfuse. It generates the JSON and I have the format of the JSON as examples in the prompt. And it has a couple of variables too. So the variables are enclosed in {{}} and json is {"key": "value"} I use decorators (@observe) and .get_langchain_prompt() to convert the prompt to langfuse format. Now the problem is that when the prompt is converted to langfuse format, the variables get converted to {} but the json remains as is. So the JSON key is also considered as a variable. Any idea?
yep
yep•4mo ago
I found out the issue is caused by fastapi and how threads are handled. I read through the history here and some users seemed to have the same issue. Is there any official workaround by now?
Juanjo
Juanjo•4mo ago
Good morning, I'm trying to deploy Langfuse in a Kubernetes Ingress using a subpath /langfuse, so the final url to access to langfuse is myingressbaseurl.com/langfuse. I was not able to find any environment variable to specify this new base url, and I'm not able to open the dashboard, can you please help me with this issue?
Rolex
Rolex•4mo ago
Never mind... I used prompt.prompt instead of .get_langchain_prompt() and used template_format="jinja2" It is working as expected.
David Diaz T
David Diaz T•4mo ago
Hello! Is there a way to register traces with 'response_format: { type: "json_object" }' from OpenAI's chat completition's API? I have checked the documentation and can't find anything. I already tried it in my workflow but got an error, so I am assuming maybe it is not possible. Any ideas?
madsciAI
madsciAI•4mo ago
hi! I am new to Langfuse and this is likely an easy answer - having trouble formatting an LLM API key correctly. I am using AI21 models. First, is it necessary to add LLM keys in the UI or would providing all API keys (Langfuse + LLM) in the Python SDK/env variables only be sufficient? If necessary, and using AI21 and not one of the three provided schemas for the adapter, how would I format the API base URL to go with the key? Would it be the endpoint used + required headers, and if so do I also put my key value in the auth bearer header? Still looking in docs for this but any help appreciated 🙂
Marc
Marc•4mo ago
Try prefixing the api host with the protocol such as http or https when running on a self-hosted instance
Marc
Marc•4mo ago
Decorator-based Python Integration - Langfuse
A decorator-based integration to give you powerful tracing, evals, and analytics for your LLM application
Marc
Marc•4mo ago
Can you create an issue on GitHub with code to reproduce this? We’re happy to have a look Langfuse tracing does not require adding keys to Langfuse. These keys are only used for the playground and evaluations.
madsciAI
madsciAI•4mo ago
thank you for the help!
litred
litred•4mo ago
Hi all, Is it possible to archive/delete traces without effecting the dashboard metrics. We do not want to store the low level information like inputs, outputs etc for more than a few months. But are interested in retaining the dashboards for trend analysis
underdog
underdog•4mo ago
how to combine multiple lcel chains into a single trace..?
Marc
Marc•4mo ago
Not possible in langfuse itself. You could however sync the metrics from the metrics api to keep a long term view of these in your datawarehouse Use python decorator to pass a langchain callback handler scoped to a single trace to multiple lcel chains
z.o.rro
z.o.rro•4mo ago
Trying to integrate langfuse with Vercel AI SDK and the example stated in docs utilizes openai-edge, however openai-edge seems to state that it is redundant now because openai js wrapper has implemented the functionality they had implemented.
No description
Marc
Marc•4mo ago
Thanks for the feedback. As you are currently adding the Vercel sdk, do you feel comfortable with making a change to the cookbook? Otherwise I’ll make a note and try to update very soon