In this directory, we collect examples of prompttrail
.
In this directory, we give examples of how to use prompttrail
as a thin wrapper around LLMs.
If you want just to use LLMs, see these examples.
provider/openai.py
- This shows how to use
prompttrail
to generate prompts for OpenAI's GPT-3.5 / 4.
- This shows how to use
provider/stream.py
- If you want to use OpenAI's streaming feature, see this example.
provider/google.py
- This shows how to use
prompttrail
to generate prompts for Google's PaLM.
- This shows how to use
provider/mock.py
- This shows how you can mock APIs for testing.
In this directory, we give examples of how to use prompttrail
to create agents.
If you want to use complex logic, function calling and so on, see these examples.
agent/fermi_problem.py
- This shows how to use
prompttrail
to create an simple agent which take multiple turns, call functions, and so on. - You can also see how you can mock the APIs for testing.
- This shows how to use
agent/weather_forecast.py
- This shows how to use
prompttrail
to create an agent which use function calling feature ofprompttrail
.
- This shows how to use
In this directory, we give examples of how to use prompttrail
as we actually use in this directory.
dogfooding/create_unit_test.py
- This shows how to use
prompttrail
to create unit tests forprompttrail
itself. - You can see the result in this PR
- This shows how to use
dogfooding/fix_markdown.py
- This shows how to use
prompttrail
to fix markdown files in this repository. - You can see the result in this PR
- This shows how to use