Update llm.py

This commit is contained in:
SpudGunMan
2024-10-24 19:47:19 -07:00
parent c8eddc3787
commit 4297c91c5e
+4 -3
View File
@@ -9,18 +9,19 @@ from modules.log import *
from ollama import Client as OllamaClient
from googlesearch import search # pip install googlesearch-python
# enahanced workflow with OpenWebUI
# enahanced workflow with OpenWebUI, allowing queries with the OpenWebUI API
openWebUI = False
openWebUI_api_key = "your_api_key"
openWebUI_collection_id = "your_collection_id"
# This is my attempt at a simple RAG implementation it will require some setup
# you will need to have the RAG data in a folder named rag in the data directory (../data/rag)
# This is lighter weight and can be used in a standalone environment, needs chromadb
# "chat with a file" is the use concept here, the file is the RAG data
ragDEV = False
if openWebUI:
import requests
openWebUI_api_key = "your_api_key"
openWebUI_collection_id = "your_collection_id"
openWebUI_base_url = 'http://localhost:3000/api'
if ragDEV: