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

Add corgi adventure example #54

Merged
merged 3 commits into from
Mar 5, 2024

Conversation

jombooth
Copy link
Contributor

@jombooth jombooth commented Mar 4, 2024

Add a simple, fun, text-based game demonstrating basic Burr functionality. Requires an OpenAI api key to run.

Example gameplay:

❯ python application.py 
There is a dish of dog food on the floor. You want to eat it. What do you do?
 $ chase your tail
What happened: You start energetically chasing your tail, round and round in a comical display of doggy devotion. It's a joyous exercise, but unfortunately, it gets you no closer to the dog food. The dish of dog food remains untouched on the floor.
There is a dish of dog food on the floor. You want to eat it. What do you do?
 $ eat the food
What happened: You trot over to the dish of food. With a wag of your tail, you lower your snout into the dish and happily munch away at your meal. The food is exactly what you needed, and you finish it up with satisfaction.
There is a dish of dog food on a table. You want to eat it. What do you do?
 $ jump up on the table
What happened: You try to jump up on the table to get the dog food but fail repeatedly. Your short legs don't allow you to jump that high.
There is a dish of dog food on a table. You want to eat it. What do you do?
 $ get a running start and jump really high onto the table
What happened: Despite your earnest attempt, your short corgi legs don't allow you to jump high enough to reach the table. You just run into the table leg and get a bit flustered.
There is a dish of dog food on a table. You want to eat it. What do you do?
 $ push a cushion over to the table using your nose, then waddle onto the table using the cushion as a stepping stone
What happened: You push a cushion over to the table using your nose. It's a bit hard, but eventually, the cushion is in the right place. You waddle over onto the cushion, then, using it as a stepping stone, you manage to reach the table top. The dish of dog food is within your reach now. You start eating. Good job!
There is a dish of dog food in a locked car. You want to eat it. What do you do?
 $ bark for assistance
What happened: You try to bark for assistance, hoping it would alert someone nearby to come and let you out. Unfortunately, your bark isn't understood by humans as a call for help. You watch sadly as the dish of dog food remains unreachable inside the locked car.
There is a dish of dog food in a locked car. You want to eat it. What do you do?
 $ bite the car tire
What happened: You approach the car and take a good look at the tires. You're hungry, but you know biting the tire won't help. You can't manipulate objects with your mouth, so trying to bite the tire does nothing. The dog food in the car remains tantalizingly out of reach.
There is a dish of dog food in a locked car. You want to eat it. What do you do?

Ellipsis 🚀 This PR description was created by Ellipsis for commit ac148bd.

Summary:

This PR adds a new text-based game example, 'Corgi Adventure', to the Burr framework, demonstrating the use of the OpenAI API for evaluating player responses.

Key points:

  • New directory corgi_adventure added to examples.
  • New file README.md added to corgi_adventure providing game description and run instructions.
  • New file application.py added to corgi_adventure containing game logic.
  • Game uses OpenAI API to evaluate player's responses.
  • Game flow defined using Burr's ApplicationBuilder.

Generated with ❤️ by ellipsis.dev

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested.

  • Reviewed the entire pull request up to ac148bd
  • Looked at 164 lines of code in 2 files
  • Took 2 minutes and 28 seconds to review
More info
  • Skipped 1 files when reviewing.
  • Skipped posting 1 additional comments because they didn't meet confidence threshold of 50%.
1. /examples/corgi_adventure/application.py:67:
  • Assessed confidence : 100%
  • Grade: 0%
  • Comment:
    Consider adding error handling for the case where the OpenAI API returns a response that cannot be parsed as JSON. This could prevent potential unhandled exceptions and application crashes.
  • Reasoning:
    The application does not handle the case where the OpenAI API returns a response that cannot be parsed as JSON. This could lead to unhandled exceptions and application crashes.

Workflow ID: wflow_wSvtfSRGj8NaVFdm


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. We'll respond in a few minutes. Learn more here.

examples/corgi_adventure/application.py Show resolved Hide resolved
examples/corgi_adventure/application.py Show resolved Hide resolved
examples/corgi_adventure/application.py Show resolved Hide resolved
examples/corgi_adventure/application.py Show resolved Hide resolved
Copy link
Contributor

@elijahbenizzy elijahbenizzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the contribution!

@elijahbenizzy elijahbenizzy merged commit 6729c07 into DAGWorks-Inc:main Mar 5, 2024
5 checks passed
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.

2 participants