Home Artists Posts Import Register

Downloads

Content

general_gpt_call is a  generalized function which takes in arguments for
- model type(gpt-3.5-turbo, gpt-4)
- count tokens or not

- keep history or not

- accepts **kwargs(key word arguments) for temperature, max_token count etc

Prints the response and the token count for each response plus the entire history plus the cost for token usage depending on the model selected

the other file is the same thing with beautiful terminal chat outputs using rich library

BONUS: Cheat sheet for Langchain:
https://github.com/Tor101/LangChain-CheatSheet

Comments

echohive42

updated this with a new file addition, which does the same thing as the original file but renders beautified terminal chat,

echohive42

Just updated this with token cost printing for the non beautified verison. it prints the cost based on model selection

Mitchell

hi Echolive how can I access the BONUS : Cheat sheet