jxnl / instructor

structured outputs for llms
https://python.useinstructor.com/
MIT License
6.52k stars 514 forks source link

Add prompting docs tests #794

Closed jxnl closed 4 days ago

jxnl commented 5 days ago

when you add docs in one block run

pytest tests/llm/test_openai/docs/test_prompt_tips.py --update-examples

instead of adding prints manually. Please make sure that everything is defined in functions and included in

if __name__ == "__main__": 
   stuff()

The goal is to allow people to copy and paste examples and modify them themselves. This will be what makes it useful. You should also avoid using all the academic names. Rewrite it as "Tips to Make Your Prompts Better." And describe what it actually does, rather than some random acronym.


:rocket: This description was created by Ellipsis for commit 8222f831ec5d042185cf7ba95dfff62d04071633

Summary:

Adds tests for documentation examples and updates markdown files to include example outputs in comments, with instructions for running and updating examples using pytest.

Key points:


Generated with :heart: by ellipsis.dev

cloudflare-pages[bot] commented 5 days ago

Deploying instructor with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8222f83
Status: ✅  Deploy successful!
Preview URL: https://a4838c73.instructor.pages.dev
Branch Preview URL: https://add-prompting-docs-tests.instructor.pages.dev

View logs