document/公司/工作/妙语/minimax.md
2024-10-07 23:17:21 +08:00

46 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

```python
import requests
group_id = "请填写您的group_id"
api_key = "请填写您的api_key"
url = f"https://api.minimax.chat/v1/text/chatcompletion_v2?GroupId=${group_id}"
headers = {
"Authorization": f"Bearer ${api_key}",
"Content-Type": "application/json"
}
payload = {
"model": "abab6.5s-chat",
"messages": [
{
"role": "system",
"name": "MM智能助理",
"content": "MM智能助理是一款由MiniMax自研的没有调用其他产品的接口的大型语言模型。MiniMax是一家中国科技公司一直致力于进行大模型相关的研究。"
},
{
"role": "user",
"name": "用户",
"content": "你好"
},
{
"content": "你好!有什么可以帮助你的吗?",
"role": "assistant",
"id": "030e77945189caa6979e5f40a58ef981",
"name": "MM智能助理"
}
],
"tools": [],
"tool_choice": "none",
"stream": False,
"max_tokens": 256,
"temperature": 0.1,
"top_p": 0.95
}
response = requests.post(url, headers=headers, json=payload)
print(response.status_code)
print(response.text)
```