-
Notifications
You must be signed in to change notification settings - Fork 3
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
Update ask code to devchat ask 0.1.8 #9
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kagami-l
requested changes
Dec 14, 2023
ask-code/ask-code.py
Outdated
print(f"***/ask-code has costed approximately ${cost} USD for this question.***") | ||
spent_money = 0.0 | ||
token_usages = answer[2].get("usages", []) | ||
if len(token_usages) > 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to check the length here
ask-code/ask-code.py
Outdated
Comment on lines
27
to
42
prices = { | ||
"gpt-4": (0.03, 0.06), | ||
"gpt-4-32k": (0.06, 0.12), | ||
"gpt-3.5-turbo": (0.0015, 0.002), | ||
"gpt-3.5-turbo-16k": (0.003, 0.004), | ||
"claude-2": (0.01102, 0.03268), | ||
"starchat-alpha": (0.0004, 0.0004), | ||
"CodeLlama-34b-Instruct": (0.0008, 0.0008), | ||
"llama-2-70b-chat": (0.001, 0.001), | ||
"gpt-3.5-turbo-1106": (0.001, 0.002), | ||
"gpt-4-1106-preview": (0.01, 0.03), | ||
"gpt-4-1106-vision-preview": (0.01, 0.03), | ||
"others": (0.001, 0.002), | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be better to add a comment noting the first element is the prompt pricing and the second is for completion.
yangbobo2021
force-pushed
the
update_ask-code_to_devchat-ask-0.1.8
branch
from
December 18, 2023 01:15
a2570bd
to
d37fbaa
Compare
kagami-l
approved these changes
Dec 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.