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 Support for Setting project_name Directly in Client Initialization #1434

Open
jeffysam6 opened this issue Jan 19, 2025 · 0 comments
Open

Comments

@jeffysam6
Copy link

Feature request

Right now, the Client class relies on the LANGCHAIN_PROJECT environment variable to determine the project name. However, there’s no way to directly pass a project_name when creating a Client. This can be limiting in situations where multiple projects need to be managed dynamically within the same application.

Proposed Change:
Allow Client to accept a project_name parameter during initialization. If provided, this should take priority over the LANGCHAIN_PROJECT environment variable. If not provided, the existing behavior can remain unchanged (defaulting to the environment variable).

Example:
client = Client(project_name="my-custom-project")

Motivation

Overwriting environment variables at runtime isn’t ideal, especially in multi-threaded environments. Allowing developers to pass project_name directly would make the API more flexible and easier to use without breaking current functionality.

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