Created
September 22, 2026 06:43
-
-
Save lgastako/2bf734558e1cd78c47b2ee9638ad48cb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| from typesafe_sdk import Choice, Noul, Score, TypeSafeClient | |
| def main(): | |
| if len(sys.argv) != 2: | |
| print("Need one args: observed text.") | |
| sys.exit(-1) | |
| q = "What percentage of this text is written by AI?" | |
| _, o = sys.argv | |
| print(f"question: {q}") | |
| print(f"observation: {o}") | |
| with TypeSafeClient() as client: | |
| response = client.system_one( | |
| state=o, | |
| questions={ | |
| "ai_pct": Choice( | |
| instructions=q, | |
| criteria={ | |
| "none": "0% or close to it.", | |
| "little": "less than 20%", | |
| "some": "20-60%", | |
| "a lot": "60-80%", | |
| "most": "80%-95%", | |
| "all": "100%" | |
| } | |
| ) | |
| } | |
| ) | |
| print(response) | |
| if __name__ == "__main__": | |
| main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment