-
Notifications
You must be signed in to change notification settings - Fork 16.2k
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
[oci_generative_ai] Option to pass auth_file_location #29481
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
ea8bba9
to
6520490
Compare
…rom default location i.e. ~/.oci/config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@@ -66,6 +69,11 @@ class OCIGenAIEmbeddings(BaseModel, Embeddings): | |||
If not specified , DEFAULT will be used | |||
""" | |||
|
|||
auth_file_location: Optional[str] = "~/.oci/config" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is Optional[str]
, what is the difference between this default and setting a default of None?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ccurme for response.
This is already there in this file
auth_profile: Optional[str] = "DEFAULT"
We have added this new one, so that we can give option to overwrite default config file location as well, same as profile name.
auth_file_location: Optional[str] = "~/.oci/config"
Later on, in this same file we have used auth_profile
and auth_file_location
to load configs. We can't pass their values as None, because of the definition of function. It will throw exception.
def from_file(file_location=DEFAULT_LOCATION, profile_name=DEFAULT_PROFILE):
https://docs.oracle.com/en-us/iaas/tools/python/2.143.1/configuration.html
PR title: "community: Option to pass auth_file_location for oci_generative_ai"
Description: Option to pass auth_file_location, to overwrite config file default location "~/.oci/config" where profile name configs present. This is not fixing any issues. Just added optional parameter called "auth_file_location", which internally supported by any OCI client including GenerativeAiInferenceClient.