diff --git a/recipes/natural_language_processing/chatbot/app/chatbot_ui.py b/recipes/natural_language_processing/chatbot/app/chatbot_ui.py index 0c233ccb..40f52b05 100644 --- a/recipes/natural_language_processing/chatbot/app/chatbot_ui.py +++ b/recipes/natural_language_processing/chatbot/app/chatbot_ui.py @@ -80,7 +80,7 @@ def memory(): options=models) llm = ChatOpenAI(base_url=model_service, - api_key="sk-no-key-required", + api_key="sk-no-key-required" if model_service_bearer is None else model_service_bearer, model=model_name, streaming=True, callbacks=[StreamlitCallbackHandler(st.empty(), diff --git a/recipes/natural_language_processing/codegen/app/codegen-app.py b/recipes/natural_language_processing/codegen/app/codegen-app.py index f1c02d25..b821edf8 100644 --- a/recipes/natural_language_processing/codegen/app/codegen-app.py +++ b/recipes/natural_language_processing/codegen/app/codegen-app.py @@ -47,7 +47,7 @@ def checking_model_service(): llm = ChatOpenAI(base_url=model_service, model=model_name, - api_key="EMPTY", + api_key="EMPTY" if model_service_bearer is None else model_service_bearer, streaming=True) # Define the Langchain chain