Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openaiwrapper memoize #7

Merged
merged 7 commits into from
Dec 24, 2023

Conversation

bearney74
Copy link
Contributor

add memoize so that we can cache the results from openaiAPIWrapper.

move the parsing logic into the chat_completion function from the various functions that call it.
move the model we use into the chat_completion function so that we can easily change it if we need to.

#remove date and time from prompts so that we can cache the results we get from openai.

@aymenfurter aymenfurter self-requested a review December 24, 2023 08:45
@aymenfurter aymenfurter added the enhancement New feature or request label Dec 24, 2023
@aymenfurter
Copy link
Owner

aymenfurter commented Dec 24, 2023

Hi @bearney74, it’s great to see a first contribution! I truly appreciate the time and effort you have invested in this work. You have made some fantastic improvements, particularly with the use of memoize to cache embedding calls across runs. Thank you very much! 🚀🚀🚀

integrations/memoize.py Show resolved Hide resolved
integrations/memoize.py Outdated Show resolved Hide resolved
integrations/openaiwrapper.py Outdated Show resolved Hide resolved
integrations/openaiwrapper.py Outdated Show resolved Hide resolved
prompt_management/prompts.py Outdated Show resolved Hide resolved
integrations/openaiwrapper.py Outdated Show resolved Hide resolved
Copy link
Owner

@aymenfurter aymenfurter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the updates to the code! 👏

@aymenfurter aymenfurter merged commit 1767cbe into aymenfurter:main Dec 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants