RubenPeeters commited on
Commit
fdd0d57
·
1 Parent(s): 31a8dd3

Change prompt

Browse files
Files changed (2) hide show
  1. agents.py +14 -0
  2. app.py +1 -1
agents.py CHANGED
@@ -31,6 +31,20 @@ model = OpenAIServerModel(
31
  # # prompt_templates=PromptTemplates(system_prompt="")
32
  # )
33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  # TODO: Add RDF specification tool, CACAO ontology tool, reasoning tool?
35
  ner_agent = CodeAgent(
36
  tools=[],
 
31
  # # prompt_templates=PromptTemplates(system_prompt="")
32
  # )
33
 
34
+ kgc_agent = CodeAgent(
35
+ tools=[get_types_from_ontology, get_entities_from_kg, get_relations_from_ontology],
36
+ model=model,
37
+ name="named_entity_recognition_expert",
38
+ description="An agent that is an expert in Named Entity Recognition. Named Entity Recognition (NER) is a subfield of computer science and Natural Language Processing (NLP) that focuses on identifying and classifying entities in unstructured text into predefined categories, such as persons, geographical locations and organizations. Provide content to this agent to detect the entities inside.",
39
+ )
40
+
41
+ validation_agent = CodeAgent(
42
+ tools=[validate_rdf_syntax],
43
+ model=model,
44
+ name="knowledge_graph_expert",
45
+ description="Has extensive knowledge on knowledge graphs. Has the final say before writing the output to a file.",
46
+ )
47
+
48
  # TODO: Add RDF specification tool, CACAO ontology tool, reasoning tool?
49
  ner_agent = CodeAgent(
50
  tools=[],
app.py CHANGED
@@ -28,7 +28,7 @@ def start_process(text):
28
  # - title: A title for the Gradio app.
29
  # - description: A brief description of the app.
30
  iface = gr.Interface(
31
- fn=manager_agent.run,
32
  inputs=gr.Textbox(lines=2, placeholder="Enter text here...", label="Input Text"),
33
  outputs=gr.Textbox(label="Final output"),
34
  title="KGC Agents",
 
28
  # - title: A title for the Gradio app.
29
  # - description: A brief description of the app.
30
  iface = gr.Interface(
31
+ fn=start_process,
32
  inputs=gr.Textbox(lines=2, placeholder="Enter text here...", label="Input Text"),
33
  outputs=gr.Textbox(label="Final output"),
34
  title="KGC Agents",