Skip to content

Commit

Permalink
Merge pull request #975 from parea-ai/PAI-1315-add-sonnet-3-5
Browse files Browse the repository at this point in the history
feat: add sonnet 3.5
  • Loading branch information
joschkabraun committed Jun 20, 2024
2 parents cf43d2a + afff214 commit c3c8720
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
5 changes: 5 additions & 0 deletions parea/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down
28 changes: 14 additions & 14 deletions parea/cookbook/instructor/instructor_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__":
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>"]
Expand Down

0 comments on commit c3c8720

Please sign in to comment.