mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-05-27 08:15:13 +02:00
- Removed unused LLM client configuration from agent-manager-react - Change agent-manager-react template to use prompt-rag instead of prompt - Changed TextCompletion tool to use 'question' instead of 'computation' for its parameter.
19 lines
667 B
Python
19 lines
667 B
Python
|
|
# This tool implementation knows how to put a question to the graph RAG
|
|
# service
|
|
class KnowledgeQueryImpl:
|
|
def __init__(self, context):
|
|
self.context = context
|
|
def invoke(self, **arguments):
|
|
return self.context.graph_rag.request(arguments.get("query"))
|
|
|
|
# This tool implementation knows how to do text completion. This uses
|
|
# the prompt service, rather than talking to TextCompletion directly.
|
|
class TextCompletionImpl:
|
|
def __init__(self, context):
|
|
self.context = context
|
|
def invoke(self, **arguments):
|
|
return self.context.prompt.request(
|
|
"question", { "question": arguments.get("question") }
|
|
)
|
|
|