OCIGenAI class got an unexpected keyword argument 'auth_file_location' #17799
Replies: 1 comment 4 replies
-
The error "TypeError: OCIGenAI.init() got an unexpected keyword argument 'auth_file_location'" suggests that the Here are a few things you can check:
If these steps do not resolve the issue, consider reviewing the specific version of the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other | Bug Report |
Beta Was this translation helpful? Give feedback.
-
Hello,
why this code returns me the following error?
TypeError: OCIGenAI.init() got an unexpected keyword argument 'auth_file_location'
`
COMPARTMENT_ID = "XXX"
AUTH_TYPE = "API_KEY" # The authentication type to use, e.g., API_KEY (default), SECURITY_TOKEN, INSTANCE_PRINCIPAL, RESOURCE_PRINCIPAL.
CONFIG_PROFILE = "DEFAULT"
endpoint = "XXX"
llm = OCIGenAI(
model="XXX",
service_endpoint=endpoint,
compartment_id=COMPARTMENT_ID,
provider="cohere",
additional_kwargs={"temperature": 1},
auth_type=AUTH_TYPE,
auth_profile=CONFIG_PROFILE,
auth_file_location="XXX"
)
messages = [
ChatMessage(role="user", content="{input}"),
]
response = llm.chat(messages)
print("Chat Result")
print(vars(response))`
Thanks,
Federico
Beta Was this translation helpful? Give feedback.
All reactions