From 73d3da9306dd51f54d55e95e88e950110d4eae9a Mon Sep 17 00:00:00 2001 From: Benjamin Date: Wed, 6 Nov 2024 15:15:00 +0100 Subject: [PATCH] Update demo_label.py --- examples/demo_label.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/examples/demo_label.py b/examples/demo_label.py index e14ac79..7fe8481 100644 --- a/examples/demo_label.py +++ b/examples/demo_label.py @@ -10,13 +10,8 @@ def label_item(category: str, from_response: Message): # TODO: Implement function raise NotImplementedError() - -with open("./function_label.json") as f: - FUNCTION_LABEL_ITEM = json.load(f) - -classifierGPT = Autochat.from_template("./classify_template.txt") - -classifierGPT.add_function(label_item, FUNCTION_LABEL_ITEM) +classifierGPT = Autochat("you classify title") +classifierGPT.add_function(label_item) text = "The new iPhone is out" for message in classifierGPT.run_conversation(text):