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

Add httpx_client parameter in LangfuseConnector #279

Closed
alex-stoica opened this issue Oct 21, 2024 · 0 comments
Closed

Add httpx_client parameter in LangfuseConnector #279

alex-stoica opened this issue Oct 21, 2024 · 0 comments

Comments

@alex-stoica
Copy link

alex-stoica commented Oct 21, 2024

The current environment variables LANGFUSE_SECRET_KEY / LANGFUSE_API_KEY, LANGFUSE_PUBLIC_KEY, and LANGFUSE_HOST may not be sufficient for tracing in Langfuse.

For example, the following code:

tracer = Langfuse()
tracer.create_prompt(
    name="greeting-prompt",
    prompt="..."
)

might return an error:

...
ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed

However, this works correctly if the env variables are set correctly:

Langfuse(
    httpx_client=httpx.Client(verify=os.getenv('LANGFUSE_PATH_TO_CERTIFICATE'))
)

To address this, please update the wrapper in haystack_integrations.components.connectors.langfuse.LangfuseConnector to accept httpx_client as a parameter.
The code fix would only affect the lines

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant