江苏省建设厅网站建造师栏国内高端大气的网站设计
2026/4/11 20:24:04 网站建设 项目流程
江苏省建设厅网站建造师栏,国内高端大气的网站设计,怎样做模板网站,上海 网站建设一、官网链接#xff08;申请API#xff09; 官网链接#xff1a;https://mimo.xiaomi.com/zh/blog/mimo-v2-flash 打开官网链接#xff0c;然后鼠标滑动到最下面#xff0c;点击API Platform跳转到API使用网页#xff0c;点击申请API 二、API使用方法#xff08;如无小…一、官网链接申请API官网链接https://mimo.xiaomi.com/zh/blog/mimo-v2-flash打开官网链接然后鼠标滑动到最下面点击API Platform跳转到API使用网页点击申请API二、API使用方法如无小米账号记得预先注册小米账号目前平台仅提供小米账号登录Xiaomi MiMo API 开放平台兼容 OpenAI API 、Anthropic API 两种主流 API 格式① OpenAI API 使用方式先使用配置依赖pip install -U openai下面是使用方式from openai import OpenAI client OpenAI( api_keysk-cfg3buzvnarzefghdr2f7bcddexagdh23o0lhun19sj256s1, # 这里和官方给的方式有点区别不知道为什么官方的方式在我的电脑上一直报错 base_urlhttps://api.xiaomimimo.com/v1 ) completion client.chat.completions.create( modelmimo-v2-flash, messages[ {role: user, content: 请从以下文本提取技术参数并转成JSONcpu/memory/storage\n小米 14 Ultra 配备骁龙 8 Gen 3 芯片16GB LPDDR5X 内存1TB UFS 4.0 闪存。} ], max_completion_tokens1024, temperature0.8, top_p0.95, streamFalse, extra_body{thinking: {type: disabled}} ) print(completion.choices[0].message.content)运行成功界面②Anthropic API 使用方式先使用配置依赖pip install -U anthropic下面是使用方式import os from anthropic import Anthropic client Anthropic( api_keysk-cfg3buzvnarzefghdr2f7bcddexagdh23o0lhun19sj256s1, base_urlhttps://api.xiaomimimo.com/anthropic ) message client.messages.create( modelmimo-v2-flash, max_tokens1024, systemYou are a helpful assistant., messages[ {role: user, content: [{type: text, text: 请从以下文本提取技术参数并转成JSONcpu/memory/storage\n小米 14 Ultra 配备骁龙 8 Gen 3 芯片16GB LPDDR5X 内存1TB UFS 4.0 闪存。}]} ], top_p0.95, streamFalse, temperature0.8, stop_sequencesNone, thinking{type: disabled} ) print(message.content)运行结果三、模型参数说明temperature:表示结果的随机性其值越大说明模型输出越具有不确定性top_p:表示控制模型生成文本的多样性其值越大说明文本的多样性越高对应任务的官方参数设置值推荐参考资料https://platform.xiaomimimo.com/#/docs/welcome

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询