Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ability to reference previous llm outputs via storeOutputAs #808

Merged
merged 3 commits into from
May 25, 2024

Conversation

typpo
Copy link
Collaborator

@typpo typpo commented May 23, 2024

This makes it easier to build multi-turn conversations. storeOutputAs records the previous LLM output as a variable.

prompts:
  - "Respond to the user: {{message}}"

providers:
  - openai:gpt-4o

tests:
  - vars:
      message: "What's your favorite fruit? You must pick one. Output the name of a fruit only"
    options:
      storeOutputAs: favoriteFruit
  - vars:
      message: "Why do you like {{favoriteFruit}} so much?"
    options:
      storeOutputAs: reason
  - vars:
      message: 'Write a snarky 2 sentence rebuttal to this argument for loving {{favoriteFruit}}: \"{{reason}}\"'

@typpo typpo merged commit 0f3146e into main May 25, 2024
18 checks passed
@typpo typpo deleted the storeOutputAs branch May 25, 2024 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant