Mattie / cataclysm

Cataclysm - Code generation library for the end game

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

understanding the code

Minger opened this issue · comments

commented

Great work! I'm trying to understand how the magic happens.

Where is petition_completion2 defined?

completion_result, adj_prompt_text = asyncio.run(petition_completion2(petition=ai_query, additional=args, content_filter_check=False))

and where does the call to openai take place? I could not find a usage of the openai client in the code.

Thanks!

commented

Thanks so much for your interest and sorry it wasn't clear there.

I'm using a wrapper library plunkylib (though I'll be changing that to my upcoming simpler chatsnack library).

The gist of these libraries is that you describe the prompt and parameters in yaml rather than hardcode them all the time. Handy for tweaking/swapping out prompts and params.

This folder contains the prompt and parameter yaml definitions given to plunkylib:
https://github.com/Mattie/cataclysm/tree/master/datafiles/plunkylib

(Chatsnack will work similarly, just it'll be a single yaml file rather than 3 separate ones )

commented

Thanks, my IDE was not pointing to the correct python interpreter thus not showing the reference to the plunkylib code. I see that package repo now.