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

使用示例中的写法调用远程推理模型,报错参数非法 #13

Open
YellowQC opened this issue Oct 5, 2024 · 1 comment
Open

Comments

@YellowQC
Copy link

YellowQC commented Oct 5, 2024

示例代码:
import os
from volcenginesdkarkruntime import Ark

client = Ark(api_key=os.environ.get("ARK_API_KEY"))

print("----- standard request -----")
completion = client.chat.completions.create(
model="<YOUR_ENDPOINT_ID>",
messages = [
{"role": "system", "content": "你是豆包,是由字节跳动开发的 AI 人工智能助手"},
{"role": "user", "content": "常见的十字花科植物有哪些?"},
],
)
print(completion.choices[0].message.content)

报错:
volcenginesdkarkruntime._exceptions.ArkBadRequestError: Error code: 400 - {'error': {'code': 'InvalidParameter', 'message': 'One or more parameters specified in the request are not valid. Request id: 0217280951205813c183a1fb82c613f4d4485b7d388d5b4d02e7e', 'param': '', 'type': 'BadRequest'}}, request_id: 20241005102519j4WT1T3n9i1nezw7uvXL

@2275698462
Copy link

在线推理那里别选 Doubao-embedding-large,要不然走的是 Embeddings 调用,EmbeddingsChatCompletions 两者需要传递的参数不同

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

No branches or pull requests

2 participants