Skip to content

Commit

Permalink
Update rag
Browse files Browse the repository at this point in the history
Signed-off-by: thepetk <[email protected]>
  • Loading branch information
thepetk committed Oct 2, 2024
1 parent 3263557 commit ef9bd1e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rag/Containerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.access.redhat.com/ubi9/python-311:1-72.1722518949
FROM registry.access.redhat.com/ubi9/python-311:1-77.1725907703
### Update sqlite for chroma
USER root
RUN dnf remove sqlite3 -y
Expand Down
3 changes: 2 additions & 1 deletion rag/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_service_bearer = os.getenv("MODEL_ENDPOINT_BEARER")
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")
Expand Down Expand Up @@ -75,7 +76,7 @@ def read_file(file):


llm = ChatOpenAI(base_url=model_service,
api_key="EMPTY",
api_key="EMPTY" if model_service_bearer is None else model_service_bearer,
model=model_name,
streaming=True,
callbacks=[StreamlitCallbackHandler(st.container(),
Expand Down
2 changes: 1 addition & 1 deletion rag/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
langchain-openai==0.1.7
langchain==0.1.20
chromadb==0.5.5
chromadb==0.5.7
sentence-transformers==2.7.0
streamlit==1.34.0
pypdf==4.2.0
Expand Down

0 comments on commit ef9bd1e

Please sign in to comment.