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
The user parameter by OpenAI\AzureOpenAI allows specifying a user ID with the chat completions call, to be able to track users dynamically for the safety and security features. Currently (Unless I missed something), the only way to do that is using the kwargs when initializing the OpenAI/AzureOpenAI client. That means that in order to pass this parameter, we have to initialize a client for each of the users, which means initializing a chain for each user separately. This is quite cumbersome and requires storing a map of users to chains. It will be far easier to pass this parameter in the invoke call, and maintaining one chain.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Checked
Feature request
Allow passing dynamic parameters to the chat completions call to the underlying LLM, when calling
invoke
from the top-level chain. Specifically, theuser
parameter to OpenAI/AzureOpenAI: https://platform.openai.com/docs/guides/safety-best-practices/end-user-idsMotivation
The
user
parameter by OpenAI\AzureOpenAI allows specifying a user ID with the chat completions call, to be able to track users dynamically for the safety and security features. Currently (Unless I missed something), the only way to do that is using the kwargs when initializing the OpenAI/AzureOpenAI client. That means that in order to pass this parameter, we have to initialize a client for each of the users, which means initializing a chain for each user separately. This is quite cumbersome and requires storing a map of users to chains. It will be far easier to pass this parameter in theinvoke
call, and maintaining one chain.Proposal (If applicable)
No response
Beta Was this translation helpful? Give feedback.
All reactions