You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
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.
The text was updated successfully, but these errors were encountered:
Totally agree! Although I would also motivate this request by the fact that the code is just look cleaner and becomes easier to test if the state of the Client is managed by given parameters and not via global variables. Moreover, since using input arguments is so conventional, I was unsuccessfully looking through the documentation and couldn't understand why I can't find it.
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.
The text was updated successfully, but these errors were encountered: