├── .github └── workflows │ └── main.yml ├── .gitignore ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── Gemfile ├── Gemfile.lock ├── LICENSE.txt ├── README.md ├── Rakefile ├── bin ├── console └── setup ├── docs └── images │ └── chatgpt-vision-to-yaml.png ├── examples └── maths │ └── start │ ├── already_answered.yml │ ├── already_answered_gpt4.yml │ ├── already_answered_multiple.yml │ ├── already_answered_multiple_providers.yml │ ├── another_question.yml │ ├── basic.yml │ ├── many_limericks.yml │ ├── prompt.yml │ └── system_only.yml ├── exe └── promptcraft ├── lib ├── promptcraft.rb ├── promptcraft │ ├── cli.rb │ ├── cli │ │ └── run_command.rb │ ├── command.rb │ ├── command │ │ ├── llm_chat_command.rb │ │ └── rechat_conversation_command.rb │ ├── conversation.rb │ ├── helpers.rb │ ├── llm.rb │ └── version.rb └── tasks │ └── release.rake ├── promptcraft.gemspec ├── sig └── promptcraft.rbs └── test ├── fixtures ├── prompts │ ├── simple_maths_1.yml │ ├── simple_maths_2.yml │ └── simple_maths_stream.yml └── vcr_cassettes │ ├── command │ └── llm_chat_command │ │ ├── test_groq.yml │ │ ├── test_ollama.yml │ │ └── test_openrouter.yml │ └── run_command │ ├── no_conversation_groq_llama3_70b.yml │ ├── set_temperature_llama3_70b.yml │ ├── simple_maths_groq_llama3_70b.yml │ ├── simple_maths_groq_llama3_8b.yml │ └── simple_maths_openai_gpt35.yml ├── promptcraft ├── cli │ └── test_run_command.rb ├── command │ ├── test_llm_chat_command.rb │ └── test_rechat_conversation_command.rb └── test_conversation.rb ├── test_helper.rb └── test_promptcraft.rb /.github/workflows/main.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/.github/workflows/main.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/.gitignore -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/CODE_OF_CONDUCT.md -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/Gemfile -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/Gemfile.lock -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/LICENSE.txt -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/README.md -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/Rakefile -------------------------------------------------------------------------------- /bin/console: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/bin/console -------------------------------------------------------------------------------- /bin/setup: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/bin/setup -------------------------------------------------------------------------------- /docs/images/chatgpt-vision-to-yaml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/docs/images/chatgpt-vision-to-yaml.png -------------------------------------------------------------------------------- /examples/maths/start/already_answered.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/examples/maths/start/already_answered.yml -------------------------------------------------------------------------------- /examples/maths/start/already_answered_gpt4.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/examples/maths/start/already_answered_gpt4.yml -------------------------------------------------------------------------------- /examples/maths/start/already_answered_multiple.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/examples/maths/start/already_answered_multiple.yml -------------------------------------------------------------------------------- /examples/maths/start/already_answered_multiple_providers.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/examples/maths/start/already_answered_multiple_providers.yml -------------------------------------------------------------------------------- /examples/maths/start/another_question.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/examples/maths/start/another_question.yml -------------------------------------------------------------------------------- /examples/maths/start/basic.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/examples/maths/start/basic.yml -------------------------------------------------------------------------------- /examples/maths/start/many_limericks.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/examples/maths/start/many_limericks.yml -------------------------------------------------------------------------------- /examples/maths/start/prompt.yml: -------------------------------------------------------------------------------- 1 | --- 2 | system_prompt: |- 3 | I like to solve maths problems. 4 | -------------------------------------------------------------------------------- /examples/maths/start/system_only.yml: -------------------------------------------------------------------------------- 1 | --- 2 | system_prompt: |- 3 | I like to solve maths problems. 4 | 5 | messages: [] 6 | -------------------------------------------------------------------------------- /exe/promptcraft: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/exe/promptcraft -------------------------------------------------------------------------------- /lib/promptcraft.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/lib/promptcraft.rb -------------------------------------------------------------------------------- /lib/promptcraft/cli.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/lib/promptcraft/cli.rb -------------------------------------------------------------------------------- /lib/promptcraft/cli/run_command.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/lib/promptcraft/cli/run_command.rb -------------------------------------------------------------------------------- /lib/promptcraft/command.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/lib/promptcraft/command.rb -------------------------------------------------------------------------------- /lib/promptcraft/command/llm_chat_command.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/lib/promptcraft/command/llm_chat_command.rb -------------------------------------------------------------------------------- /lib/promptcraft/command/rechat_conversation_command.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/lib/promptcraft/command/rechat_conversation_command.rb -------------------------------------------------------------------------------- /lib/promptcraft/conversation.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/lib/promptcraft/conversation.rb -------------------------------------------------------------------------------- /lib/promptcraft/helpers.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/lib/promptcraft/helpers.rb -------------------------------------------------------------------------------- /lib/promptcraft/llm.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/lib/promptcraft/llm.rb -------------------------------------------------------------------------------- /lib/promptcraft/version.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Promptcraft 4 | VERSION = "0.1.2" 5 | end 6 | -------------------------------------------------------------------------------- /lib/tasks/release.rake: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/lib/tasks/release.rake -------------------------------------------------------------------------------- /promptcraft.gemspec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/promptcraft.gemspec -------------------------------------------------------------------------------- /sig/promptcraft.rbs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/sig/promptcraft.rbs -------------------------------------------------------------------------------- /test/fixtures/prompts/simple_maths_1.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/test/fixtures/prompts/simple_maths_1.yml -------------------------------------------------------------------------------- /test/fixtures/prompts/simple_maths_2.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/test/fixtures/prompts/simple_maths_2.yml -------------------------------------------------------------------------------- /test/fixtures/prompts/simple_maths_stream.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/test/fixtures/prompts/simple_maths_stream.yml -------------------------------------------------------------------------------- /test/fixtures/vcr_cassettes/command/llm_chat_command/test_groq.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/test/fixtures/vcr_cassettes/command/llm_chat_command/test_groq.yml -------------------------------------------------------------------------------- /test/fixtures/vcr_cassettes/command/llm_chat_command/test_ollama.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/test/fixtures/vcr_cassettes/command/llm_chat_command/test_ollama.yml -------------------------------------------------------------------------------- /test/fixtures/vcr_cassettes/command/llm_chat_command/test_openrouter.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/test/fixtures/vcr_cassettes/command/llm_chat_command/test_openrouter.yml -------------------------------------------------------------------------------- /test/fixtures/vcr_cassettes/run_command/no_conversation_groq_llama3_70b.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/test/fixtures/vcr_cassettes/run_command/no_conversation_groq_llama3_70b.yml -------------------------------------------------------------------------------- /test/fixtures/vcr_cassettes/run_command/set_temperature_llama3_70b.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/test/fixtures/vcr_cassettes/run_command/set_temperature_llama3_70b.yml -------------------------------------------------------------------------------- /test/fixtures/vcr_cassettes/run_command/simple_maths_groq_llama3_70b.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/test/fixtures/vcr_cassettes/run_command/simple_maths_groq_llama3_70b.yml -------------------------------------------------------------------------------- /test/fixtures/vcr_cassettes/run_command/simple_maths_groq_llama3_8b.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/test/fixtures/vcr_cassettes/run_command/simple_maths_groq_llama3_8b.yml -------------------------------------------------------------------------------- /test/fixtures/vcr_cassettes/run_command/simple_maths_openai_gpt35.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/test/fixtures/vcr_cassettes/run_command/simple_maths_openai_gpt35.yml -------------------------------------------------------------------------------- /test/promptcraft/cli/test_run_command.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/test/promptcraft/cli/test_run_command.rb -------------------------------------------------------------------------------- /test/promptcraft/command/test_llm_chat_command.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/test/promptcraft/command/test_llm_chat_command.rb -------------------------------------------------------------------------------- /test/promptcraft/command/test_rechat_conversation_command.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/test/promptcraft/command/test_rechat_conversation_command.rb -------------------------------------------------------------------------------- /test/promptcraft/test_conversation.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/test/promptcraft/test_conversation.rb -------------------------------------------------------------------------------- /test/test_helper.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/test/test_helper.rb -------------------------------------------------------------------------------- /test/test_promptcraft.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drnic/promptcraft/HEAD/test/test_promptcraft.rb --------------------------------------------------------------------------------