Skip to content

Commit

Permalink
Configure model for rag recipe
Browse files Browse the repository at this point in the history
Signed-off-by: Maysun J Faisal <[email protected]>
  • Loading branch information
maysunfaisal committed Aug 9, 2024
1 parent 2249889 commit 3a25158
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions recipes/natural_language_processing/rag/app/rag_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

model_service = os.getenv("MODEL_ENDPOINT","http://0.0.0.0:8001")
model_service = f"{model_service}/v1"
model_name = os.getenv("MODEL_NAME", "")
chunk_size = os.getenv("CHUNK_SIZE", 150)
embedding_model = os.getenv("EMBEDDING_MODEL","BAAI/bge-base-en-v1.5")
vdb_vendor = os.getenv("VECTORDB_VENDOR", "chromadb")
Expand Down Expand Up @@ -75,6 +76,7 @@ def read_file(file):

llm = ChatOpenAI(base_url=model_service,
api_key="EMPTY",
model=model_name,
streaming=True,
callbacks=[StreamlitCallbackHandler(st.container(),
collapse_completed_thoughts=True)])
Expand Down

0 comments on commit 3a25158

Please sign in to comment.