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 add anthropic_api #961

Merged
merged 2 commits into from
Mar 5, 2024
Merged

Feat add anthropic_api #961

merged 2 commits into from
Mar 5, 2024

Conversation

better629
Copy link
Collaborator

@better629 better629 commented Mar 5, 2024

Features

  • add anthropic api
  • simplify provider code
  • fix langchain from module 'sqlalchemy' has no attribute 'Select' and update sqlalchemy version
  • complete timeout param due to AS requirment

Feature Docs

api configuration ·https://github.com/geekan/MetaGPT-docs/pull/101

Influence

Result

(metagpt) MacBook-Pro:MetaGPT xxx$ pytest tests/metagpt/provider/*
============================================================================== test session starts ===============================================================================
collected 37 items

tests/metagpt/provider/postprocess/test_base_postprocess_plugin.py .                                                                                                       [  2%]
tests/metagpt/provider/postprocess/test_llm_output_postprocess.py .                                                                                                        [  5%]
tests/metagpt/provider/test_anthropic_api.py .                                                                                                                             [  8%]
tests/metagpt/provider/test_azure_llm.py .                                                                                                                                 [ 10%]
tests/metagpt/provider/test_base_llm.py ..                                                                                                                                 [ 16%]
tests/metagpt/provider/test_dashscope_api.py .                                                                                                                             [ 18%]
tests/metagpt/provider/test_general_api_base.py .......                                                                                                                    [ 37%]
tests/metagpt/provider/test_general_api_requestor.py ...                                                                                                                   [ 45%]
tests/metagpt/provider/test_google_gemini_api.py .                                                                                                                         [ 48%]
tests/metagpt/provider/test_human_provider.py .                                                                                                                            [ 51%]
tests/metagpt/provider/test_metagpt_llm.py .                                                                                                                               [ 54%]
tests/metagpt/provider/test_ollama_api.py .                                                                                                                                [ 56%]
tests/metagpt/provider/test_openai.py ........                                                                                                                             [ 78%]
tests/metagpt/provider/test_qianfan_api.py .                                                                                                                               [ 81%]
tests/metagpt/provider/test_spark_api.py ...                                                                                                                               [ 89%]
tests/metagpt/provider/test_zhipuai_api.py ..                                                                                                                              [ 94%]
tests/metagpt/provider/zhipuai/test_async_sse_client.py .                                                                                                                  [ 97%]
tests/metagpt/provider/zhipuai/test_zhipu_model_api.py .                                                                                                                   [100%]

========================================================================= 37 passed, 1 warning in 34.84s =========================================================================

anthropic_20240305.txt

Other

@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 91.75258% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 81.18%. Comparing base (0e63b92) to head (8650fc2).

Files Patch % Lines
metagpt/utils/common.py 25.00% 3 Missing ⚠️
metagpt/provider/human_provider.py 50.00% 2 Missing ⚠️
metagpt/provider/spark_api.py 50.00% 2 Missing ⚠️
metagpt/provider/anthropic_api.py 97.95% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #961      +/-   ##
==========================================
- Coverage   81.20%   81.18%   -0.02%     
==========================================
  Files         226      226              
  Lines       12628    12642      +14     
==========================================
+ Hits        10255    10264       +9     
- Misses       2373     2378       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@geekan geekan left a comment

Choose a reason for hiding this comment

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

lgtm

@geekan geekan merged commit b7ec9fe into geekan:main Mar 5, 2024
1 of 3 checks passed
@better629 better629 deleted the feat_claude branch March 5, 2024 08:32
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.

3 participants