ruff check and format
This commit is contained in:
+8
-6
@@ -1,8 +1,9 @@
|
||||
import sys
|
||||
import dspy
|
||||
from experts.dnd_agent import DnDRAG
|
||||
from config_loader import load_config
|
||||
|
||||
import dspy
|
||||
|
||||
from config_loader import load_config
|
||||
from experts.dnd_agent import DnDRAG
|
||||
|
||||
CFG = load_config()
|
||||
RETRIEVE_MODEL = CFG["models"]["retrieval"]
|
||||
@@ -13,7 +14,7 @@ API_VERSION = CFG["api"]["api_version"]
|
||||
def main():
|
||||
# 1. Setup the LLM
|
||||
print("🚀 Initializing Qwen-8B via LM Studio...")
|
||||
lm = dspy.LM(RETRIEVE_MODEL, api_base=API_BASE+API_VERSION)
|
||||
lm = dspy.LM(RETRIEVE_MODEL, api_base=API_BASE + API_VERSION)
|
||||
dspy.configure(lm=lm)
|
||||
|
||||
# 2. Load the RAG System (only happens once!)
|
||||
@@ -35,7 +36,7 @@ def main():
|
||||
if query.lower() in ["exit", "quit", "q"]:
|
||||
print("Farewell, traveler. Good luck on your quest!")
|
||||
break
|
||||
|
||||
|
||||
if not query:
|
||||
continue
|
||||
|
||||
@@ -52,5 +53,6 @@ def main():
|
||||
except Exception as e:
|
||||
print(f"\n⚠️ An error occurred: {e}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user