mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-20 18:51:03 +02:00
Remove cruft
This commit is contained in:
parent
7a52e94779
commit
b6ab22dcdd
1 changed files with 4 additions and 56 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue