Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mmabrouk committed Dec 10, 2024
1 parent 7c94b2e commit 990bb6b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions examples/custom_workflows/rag-docs-qa/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"""
ag.init()

litellm.callbacks = [ag.callbacks.litellm_handler()]
# litellm.callbacks = [ag.callbacks.litellm_handler()]

# Initialize Qdrant client
qdrant_client = QdrantClient(
Expand Down Expand Up @@ -156,10 +156,7 @@ def rerank_results(query: str, results: List[Dict]) -> List[Dict]:
@ag.route("/", config_schema=Config)
@ag.instrument()
def generate(query: str):
if os.getenv("AGENTA_ENV", False):
config = ag.ConfigManager.get_from_route(Config)
else:
config = Config()
config = ag.ConfigManager.get_from_route(Config)
results = search_docs(query)
if config.use_rerank:
reranked_results = rerank_results(query, results)
Expand Down

0 comments on commit 990bb6b

Please sign in to comment.