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

Add a xxhash based cache #325

Closed
creatorrr opened this issue May 7, 2024 · 0 comments · Fixed by #336
Closed

Add a xxhash based cache #325

creatorrr opened this issue May 7, 2024 · 0 comments · Fixed by #336
Assignees

Comments

@creatorrr
Copy link
Contributor

creatorrr commented May 7, 2024

Use xxhash for hashing, create a cozo table for saving these. lookup before every call to openai

xxhash(json.dumps({ chatml, parameters })) => cache lookup => openai

the hash is the key, save the response as the value

@creatorrr creatorrr changed the title Add a semantic & hash based cache Add a xxhash based cache May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants