Skip to content

Commit

Permalink
Update demo_label.py
Browse files Browse the repository at this point in the history
  • Loading branch information
BenderV authored Nov 6, 2024
1 parent b3bc0a0 commit 73d3da9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions examples/demo_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 73d3da9

Please sign in to comment.