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

Feat/new models #248

Merged
merged 4 commits into from
Aug 8, 2024
Merged

Feat/new models #248

merged 4 commits into from
Aug 8, 2024

Conversation

0xArdi
Copy link
Collaborator

@0xArdi 0xArdi commented Aug 8, 2024

Proposed changes

This PR adds support for gpt4o and claude3.5-sonnet.

Types of changes

What types of changes does your code introduce? (A breaking change is a fix or feature that would cause existing functionality and APIs to not work as expected.)
Put an x in the box that applies

  • Non-breaking fix (non-breaking change which fixes an issue)
  • Breaking fix (breaking change which fixes an issue)
  • Non-breaking feature (non-breaking change which adds functionality)
  • Breaking feature (breaking change which adds functionality)
  • Refactor (non-breaking change which changes implementation)
  • Messy (mixture of the above - requires explanation!)

Checklist

Put an x in the boxes that apply.

  • I have read the CONTRIBUTING doc
  • I am making a pull request against the main branch (left side). Also you should start your branch off our main.
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works

0xArdi added 3 commits August 8, 2024 13:41
# Conflicts:
#	packages/gnosis/customs/ofv_market_resolver/component.yaml
#	packages/packages.json
@@ -348,6 +348,11 @@ def error_response(msg: str) -> Tuple[str, None, None, None]:
"limit_max_tokens": 8192,
"temperature": 0,
},
"gpt-4o-2024-05-13": {
"default_max_tokens": 500,
Copy link
Collaborator

Choose a reason for hiding this comment

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

why this limit on 500?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I just copied over from above.

@@ -348,6 +348,11 @@ def error_response(msg: str) -> Tuple[str, None, None, None]:
"limit_max_tokens": 8192,
"temperature": 0,
},
"gpt-4o-2024-05-13": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The "gpt-4o-2024-08-06" model is cheaper...?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, will replace.

@@ -254,6 +254,11 @@ def embeddings(self, model, input):
"limit_max_tokens": 8192,
"temperature": 0,
},
"gpt-4o-2024-05-13": {
"default_max_tokens": 500,
"limit_max_tokens": 4096,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think thats for the input no?

Copy link
Collaborator

Choose a reason for hiding this comment

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

in the url that I shared.... search for sonnet and check the config that is there and the one you wrote for limit_max_tokens you put the max input tokens value, not the max_output tokens value. Then why for the gpt model you are putting in limit_max_tokens the max output tokens instead of the input max?

},
"gpt-4o-2024-05-13": {
"default_max_tokens": 500,
"limit_max_tokens": 4096,
Copy link
Collaborator

Choose a reason for hiding this comment

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

@@ -348,6 +348,11 @@ def error_response(msg: str) -> Tuple[str, None, None, None]:
"limit_max_tokens": 8192,
"temperature": 0,
},
"gpt-4o-2024-05-13": {
"default_max_tokens": 500,
"limit_max_tokens": 4096,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Base automatically changed from feat/ofv-merged to main August 8, 2024 14:00
@@ -36,9 +36,11 @@ class TokenCounterCallback:
"gpt-4-turbo-preview": {"input": 0.01, "output": 0.03},
"gpt-4-0125-preview": {"input": 0.01, "output": 0.03},
"gpt-4-1106-preview": {"input": 0.01, "output": 0.03},
"gpt-4o-2024-08-06": {"input": 0.01, "output": 0.03},
Copy link
Collaborator

Choose a reason for hiding this comment

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

where did you get those values? they are different from the ones here
https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json

@0xArdi 0xArdi merged commit fcd7fca into main Aug 8, 2024
6 of 7 checks passed
@0xArdi 0xArdi deleted the feat/new-models branch August 8, 2024 19:43
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.

2 participants