【求助帖】Chinese LLaMA Alpaca系列模型OpenAI API调用实现 curl使用的问题 #499
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: HswOAuth/llm_course#499
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
我现在使用的是汇视威云平台,如何通过curl访问大模型API?


通过gitbash启动大模型后输出:
新开的一个gitbash并逐行输入如下内容
curl http://0.0.0.0:19327/v1/chat/completions
-H "Content-Type: application/json"
-H "Authorization: Bearer x"
-d '{
"model": "llama-3-chinese",
"messages": [
{
"role": "user",
"content": "1+1等于⼏?"
}
],
"max_tokens": 4096
}'
返回错误:
把curl http://0.0.0.0:19327替换成:curl http://127.0.0.1:19327试试。127.0.0.1代表是本地本机IP
在汇视威训练平台的jupyter里面输入命令。