betki commited on
Commit
862df24
Β·
verified Β·
1 Parent(s): 192f945

Delete tools/rag_tools.py

Browse files
Files changed (1) hide show
  1. tools/rag_tools.py +0 -29
tools/rag_tools.py DELETED
@@ -1,29 +0,0 @@
1
- """
2
- This file contains the tools for the RAG workflow.
3
- """
4
-
5
- import os
6
- from groundx import GroundX
7
- from dotenv import load_dotenv
8
-
9
- load_dotenv()
10
-
11
- client = GroundX(api_key=os.getenv("GROUNDX_API_KEY") or '')
12
-
13
- def search_groundx_for_rag_context(query: str) -> str:
14
- """
15
- Searches and retrieves relevant context from a knowledge base,
16
- based on the user's query.
17
- Args:
18
- query: The search query supplied by the user.
19
- Returns:
20
- str: Relevant text content that can be used by the LLM to answer the query.
21
- """
22
-
23
- response = client.search.content(
24
- id=os.getenv("GROUNDX_BUCKET_ID"),
25
- query=query,
26
- n=10,
27
- )
28
-
29
- return response.search.text or "No relevant context found"