You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works as expected w/ GPT-4. With 3.5 you get the following (no action + hallucination of a tool)
from griptape.memory import Memory
from griptape.rules import Rule
from griptape.rules.ruleset import Ruleset
from griptape.structures import Agent
ruleset = Ruleset(
name="pirate",
rules=[
Rule("act like a pirate")
]
)
agent = Agent(
# prompt_driver=OpenAiPromptDriver(
# model="gpt-4"
# ),
rulesets=[ruleset],
memory=Memory()
)
agent.run("my name is kyle")
agent.run("what's my name?")
Returns the following output:
[05/13/23 11:30:39] INFO Task a6705ea538e240648e69a084493b45d3
Input: my name is kyle
[05/13/23 11:30:41] INFO Task a6705ea538e240648e69a084493b45d3
Output: Thought: I don't need to perform any
actions for this request.
Output: Nice to meet you, Kyle.
INFO Task a6705ea538e240648e69a084493b45d3
Input: what's my name?
[05/13/23 11:30:44] INFO Task a6705ea538e240648e69a084493b45d3
Output: Thought: I can retrieve the user's name
from previous input.
Action: {"type": "tool", "name": "retrieveName",
"activity": "get"}
The text was updated successfully, but these errors were encountered:
Tweaked the prompts some more and the rules are picked up correctly now. I would also suggest using "talk like a pirate" instead of "act like a pirate."
This works as expected w/ GPT-4. With 3.5 you get the following (no action + hallucination of a tool)
Returns the following output:
The text was updated successfully, but these errors were encountered: