This commit is contained in:
ishaan-jaff 2023-09-26 10:11:53 -07:00
parent d1bd9fd987
commit 660a223663
2 changed files with 3 additions and 3 deletions

View file

@ -19,8 +19,8 @@ def completion(
model: str, model: str,
messages: list, messages: list,
model_response: ModelResponse, model_response: ModelResponse,
api_key: str,
print_verbose: Callable, print_verbose: Callable,
api_key,
encoding, encoding,
logging_obj, logging_obj,
optional_params=None, optional_params=None,

View file

@ -794,7 +794,7 @@ def completion(
return response return response
response = model_response response = model_response
elif custom_llm_provider == "palm": elif custom_llm_provider == "palm":
api_key = ( palm_api_key = (
api_key api_key
or get_secret("PALM_API_KEY") or get_secret("PALM_API_KEY")
or litellm.api_key or litellm.api_key
@ -809,7 +809,7 @@ def completion(
litellm_params=litellm_params, litellm_params=litellm_params,
logger_fn=logger_fn, logger_fn=logger_fn,
encoding=encoding, encoding=encoding,
api_key=api_key, api_key=palm_api_key,
logging_obj=logging logging_obj=logging
) )
if "stream_tokens" in optional_params and optional_params["stream_tokens"] == True: if "stream_tokens" in optional_params and optional_params["stream_tokens"] == True: