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

Helenlei/ai gpt costing #435

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Helenlei/ai gpt costing #435

wants to merge 6 commits into from

Conversation

leihelen
Copy link
Contributor

@leihelen leihelen commented Mar 3, 2024

Script that can be used to get the numbers needed to calculated the total costs for creating "cornellian says" summaries, depending on which model we use. For example, below are the results for if we wanted to create summaries for all courses that have at least 3 reviews.
Screenshot 2024-03-02 at 8 36 05 PM

@leihelen leihelen requested a review from a team as a code owner March 3, 2024 01:53
@dti-github-bot
Copy link
Member

dti-github-bot commented Mar 3, 2024

[diff-counting] Significant lines: 151.

Copy link
Contributor

@qiandrewj qiandrewj left a comment

Choose a reason for hiding this comment

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

This looks great, Helen! Code is streamlined and I like that we have different options to only look at courses with a minimum number of reviews - it'll be a huge help as we look into OpenAI costing. The one thing I can point out is in the '/costing' route it would be helpful to get the minimum from the request body and pass it in to the function. Great work overall :)

@jacquelinecai
Copy link
Contributor

Great work Helen! The structure of the code is very easy to follow. I think something that might also help with the OpenAI costing would be to look at the average number of distinct words in each review.

@CLAassistant
Copy link

CLAassistant commented Mar 3, 2024

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
3 out of 4 committers have signed the CLA.

✅ wizhaaa
✅ leihelen
✅ qiandrewj
❌ jacquelinecai
You have signed the CLA already but the status is still pending? Let us recheck it.

@wizhaaa
Copy link
Collaborator

wizhaaa commented Mar 6, 2024

This is amazing Helen - great to see you getting the pieces connected together and running the functions on our staging database.

Here are some more reference points which you can use to provide & calculate more concrete prices from https://openai.com/pricing

(4 characters = 1 token) and GPT-4 and GPT-3.5 turbo have some pretty drastic price points.

image

Currently discussing production-level database access with Sarah right now - looking like we may be able to get temporary read access first.

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 this pull request may close these issues.

None yet

6 participants