Skip to content

Commit

Permalink
Merge pull request #519 from johnmcollier/configuremodel
Browse files Browse the repository at this point in the history
Configure model for chatbot and codegen recipes
  • Loading branch information
rhatdan authored Jun 3, 2024
2 parents b182397 + c25aac8 commit 4471de3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def memory():
memory = ConversationBufferWindowMemory(return_messages=True,k=3)
return memory

model_name = ""
model_name = os.getenv("MODEL_NAME", "")

if server == "Ollama":
models = get_models()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ def checking_model_service():
for msg in st.session_state.messages:
st.chat_message(msg["role"]).write(msg["content"])

llm = ChatOpenAI(base_url=model_service,
model_name = os.getenv("MODEL_NAME", "")

llm = ChatOpenAI(base_url=model_service,
model=model_name,
api_key="EMPTY",
streaming=True)

Expand Down

0 comments on commit 4471de3

Please sign in to comment.