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

fixbug: there's a problem about using external LLM of huoshan #1429 #1438

Merged
merged 3 commits into from
Aug 7, 2024

Conversation

iorisa
Copy link
Collaborator

@iorisa iorisa commented Aug 5, 2024

@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 44.82759% with 16 lines in your changes missing coverage. Please review.

Project coverage is 62.58%. Comparing base (9d38a30) to head (c886d01).

Files Patch % Lines
metagpt/provider/ark_api.py 40.74% 16 Missing ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1438      +/-   ##
==========================================
- Coverage   62.62%   62.58%   -0.04%     
==========================================
  Files         287      287              
  Lines       17564    17588      +24     
==========================================
+ Hits        10999    11008       +9     
- Misses       6565     6580      +15     

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

@iorisa iorisa changed the base branch from v0.8-release to main August 6, 2024 08:27
@iorisa iorisa closed this Aug 6, 2024
@iorisa iorisa reopened this Aug 6, 2024
@iorisa iorisa changed the title feat: +provider ark. #1429 feat: there's a problem about using external LLM of huoshan #1429 Aug 6, 2024
@iorisa iorisa changed the title feat: there's a problem about using external LLM of huoshan #1429 fixbug: there's a problem about using external LLM of huoshan #1429 Aug 6, 2024
@iorisa iorisa removed the features label Aug 6, 2024
@@ -16,11 +37,45 @@ class ArkLLM(OpenAILLM):
见:https://www.volcengine.com/docs/82379/1263482
"""

aclient: Optional[AsyncArk] = None
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems ark has a openai compatible interface, should we use the official sdk?

Copy link
Collaborator

Choose a reason for hiding this comment

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

ok, to support also ak/sk

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The openai compatible interface is not working, so it's replaced by sdk.

@@ -187,6 +187,14 @@
"mixtral-8x7b": {"prompt": 0.4, "completion": 1.6},
}

# https://console.volcengine.com/ark/region:ark+cn-beijing/model
DOUBAO_TOKEN_COSTS = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

There also doubao-xx related token cost under TOKEN_COSTS, you can delete it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

截屏2024-08-07 15 08 09

The model name has the version number embedded in it.
DOUBAO_TOKEN_COSTS provides model names without version numbers for pricing_plan configuration.

@better629
Copy link
Collaborator

lgtm

@better629 better629 merged commit 48de3f9 into geekan:main Aug 7, 2024
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants