Skip to content

Commit

Permalink
Merge pull request #799 from thepetk/feat/add_bearer_to_chatbot_and_c…
Browse files Browse the repository at this point in the history
…odegen

Pass bearer to ChatOpenAI object
  • Loading branch information
rhatdan authored Oct 11, 2024
2 parents 2c669ae + e192e2a commit 2b09302
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2b09302

Please sign in to comment.