From b6ab22dcdd53fd3206a75ce8cd336b43e5209229 Mon Sep 17 00:00:00 2001 From: Cyber MacGeddon Date: Sun, 10 Nov 2024 10:53:37 +0000 Subject: [PATCH] Remove cruft --- .../trustgraph/agent/react/tools.py | 60 ++----------------- 1 file changed, 4 insertions(+), 56 deletions(-) diff --git a/trustgraph-flow/trustgraph/agent/react/tools.py b/trustgraph-flow/trustgraph/agent/react/tools.py index 7154fa79..d9bc846f 100644 --- a/trustgraph-flow/trustgraph/agent/react/tools.py +++ b/trustgraph-flow/trustgraph/agent/react/tools.py @@ -1,66 +1,14 @@ -# from . types import Tool - -# class CatsKb: -# tool = Tool( -# name = "cats-kb", -# description = "Query a knowledge base with information about Mark's cats. The query should be a simple natural language question", -# arguments = [ -# Argument( -# name = "query", -# type = "string", -# description = "The search query string" -# ) -# ] -# ) -# def __init__(self, context): -# self.context = context -# def invoke(self, **arguments): -# return self.context.graph_rag.request(arguments.get("query")) - -# class ShuttleKb: -# tool = Tool( -# name = "shuttle-kb", -# description = "Query a knowledge base with information about the space shuttle. The query should be a simple natural language question", -# arguments = [ -# Argument( -# name = "query", -# type = "string", -# description = "The search query string" -# ) -# ] -# ) -# def __init__(self, context): -# self.context = context -# def invoke(self, **arguments): -# return self.context.graph_rag.request(arguments.get("query")) - -# class Compute: -# tool = Tool( -# name = "compute", -# description = "A computation engine which can answer questions about maths and computation", -# arguments = [ -# Argument( -# name = "computation", -# type = "string", -# description = "The computation to solve" -# ) -# ] -# ) -# def __init__(self, context): -# self.context = context -# def invoke(self, **arguments): -# return self.context.prompt.request( -# "question", { "question": arguments.get("computation") } -# ) - - +# 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