号好像死了挖槽,我都登录不了
KEY:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjk1NWQwLTdmOWMtNGQ2Yy1hNGM4LTBkNjU1NTEyYTIzMCIsInR5cGUiOiJpZV9tb2RlbCJ9.fkIGAAlmcuvRo0RjoNhqAGWphvUTpACTnNvBfPUvFnQ
建议使用模型:
Qwen/Qwen3-235B-A22B-FP8、deepseek-ai/DeepSeek-R1、deepseek-ai/DeepSeek-V3-0324
请求示例:
import requests
import json
api_key = “eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYxZjk1NWQwLTdmOWMtNGQ2Yy1hNGM4LTBkNjU1NTEyYTIzMCIsInR5cGUiOiJpZV9tb2RlbCJ9.fkIGAAlmcuvRo0RjoNhqAGWphvUTpACTnNvBfPUvFnQ”
chat_url = “https://api.gmi-serving.com/v1/chat/completions”
headers = {
“Authorization”: f"Bearer {api_key}",
“Content-Type”: “application/json”
}
user_message_content = input(“请输入消息:”)
payload = {
“model”: “deepseek-ai/DeepSeek-R1”,
“messages”: [
{“role”: “user”, “content”: user_message_content}
],
“max_tokens”: 2000,
“temperature”: 1.0
}
response = requests.post(chat_url, headers=headers, json=payload)
response.raise_for_status()
print(json.dumps(response.json(), indent=2, ensure_ascii=False))
返回结果:
请输入消息:hi
{
“id”: “38e9e17fd0a142219a17a10105e9e915”,
“object”: “chat.completion”,
“created”: 1747500437,
“model”: “deepseek-ai/DeepSeek-R1”,
“choices”: [
{
“index”: 0,
“message”: {
“role”: “assistant”,
“content”: “Hi there! :waving_hand: How can I assist you today?”,
“reasoning_content”: “Okay, the user just said "hi". I need to respond friendly and welcome them. Maybe ask how I can assist them today. Keep it open so they feel comfortable to ask anything. Make sure the tone is warm and approachable. Also, check for any specific emojis or punctuation to keep it casual but professional.\n”,
“tool_calls”: null
},
“logprobs”: null,
“finish_reason”: “stop”,
“matched_stop”: 1
}
],
“usage”: {
“prompt_tokens”: 6,
“total_tokens”: 87,
“completion_tokens”: 81,
“prompt_tokens_details”: null
}
} 谢谢分享,看看 查看 是ai吗 lululu 啥东西是AI吗? 这个是不是要先买显卡才能用啊 amoy 发表于 2025-5-18 01:09
KEY:
这个是不是要先买显卡才能用啊
看看隐藏 学习学习 学习学习。 看看还能白嫖不 可以,100刀爽 感谢分享 不错
页:
1
[2]