From afff21436512ce323a81220da2bb09dd1de761b1 Mon Sep 17 00:00:00 2001 From: Joschka Braun Date: Thu, 20 Jun 2024 15:47:00 -0400 Subject: [PATCH] feat: add sonnet 3.5 --- parea/constants.py | 5 ++++ .../instructor/instructor_streaming.py | 28 +++++++++---------- pyproject.toml | 2 +- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/parea/constants.py b/parea/constants.py index 3a7db56e..20ca78f8 100644 --- a/parea/constants.py +++ b/parea/constants.py @@ -354,6 +354,11 @@ def str2bool(v): "prompt": 0.25, "completion": 1.25, }, + "claude-3-5-sonnet-20240620": { + "token_limit": {"max_prompt_tokens": 200000, "max_completion_tokens": 4096}, + "prompt": 3.00, + "completion": 15.00, + }, } ALL_NON_AZURE_MODELS_INFO = {**OPENAI_MODEL_INFO, **ANTHROPIC_MODEL_INFO} diff --git a/parea/cookbook/instructor/instructor_streaming.py b/parea/cookbook/instructor/instructor_streaming.py index 46208439..84f9c766 100644 --- a/parea/cookbook/instructor/instructor_streaming.py +++ b/parea/cookbook/instructor/instructor_streaming.py @@ -41,20 +41,20 @@ async def main(): async for u in user: print(u) - user2 = client.completions.create_partial( - model="gpt-3.5-turbo", - max_tokens=1024, - max_retries=3, - messages=[ - { - "role": "user", - "content": "Please crea a user", - } - ], - response_model=UserDetail, - ) - async for u in user2: - print(u) + # user2 = client.completions.create_partial( + # model="gpt-3.5-turbo", + # max_tokens=1024, + # max_retries=3, + # messages=[ + # { + # "role": "user", + # "content": "Please crea a user", + # } + # ], + # response_model=UserDetail, + # ) + # async for u in user2: + # print(u) if __name__ == "__main__": diff --git a/pyproject.toml b/pyproject.toml index a09d6cd5..887298e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "parea-ai" packages = [{ include = "parea" }] -version = "0.2.179" +version = "0.2.180" description = "Parea python sdk" readme = "README.md" authors = ["joel-parea-ai "]