|
| 1 | +{ |
| 2 | + "name": "Qwen-Coder-Plus", |
| 3 | + "description": "千问系列代码及编程模型是专门用于编程和代码生成的语言模型,性能出色,效果突出。", |
| 4 | + "items": [ |
| 5 | + { |
| 6 | + "inferenceMetadata": { |
| 7 | + "response_modality": [ |
| 8 | + "Text" |
| 9 | + ], |
| 10 | + "request_modality": [ |
| 11 | + "Text" |
| 12 | + ] |
| 13 | + }, |
| 14 | + "description": "千问系列代码及编程模型是专门用于编程和代码生成的语言模型,性能出色,效果突出。", |
| 15 | + "offlineAt": "2026-07-13T15:59:59.000+00:00", |
| 16 | + "features": [ |
| 17 | + "model-experience" |
| 18 | + ], |
| 19 | + "provider": "qwen-domain-model", |
| 20 | + "model": "qwen-coder-plus", |
| 21 | + "prices": [ |
| 22 | + { |
| 23 | + "priceUnit": "每百万tokens", |
| 24 | + "price": "3.5", |
| 25 | + "timeBand": "standard", |
| 26 | + "type": "input_token", |
| 27 | + "priceName": "输入" |
| 28 | + }, |
| 29 | + { |
| 30 | + "priceUnit": "每百万tokens", |
| 31 | + "price": "7", |
| 32 | + "timeBand": "standard", |
| 33 | + "type": "output_token", |
| 34 | + "priceName": "输出" |
| 35 | + } |
| 36 | + ], |
| 37 | + "qpmInfo": { |
| 38 | + "model-default-actual": { |
| 39 | + "count_limit_period": 1, |
| 40 | + "usage_limit": 100000, |
| 41 | + "usage_limit_field": "total_tokens", |
| 42 | + "count_limit": 20, |
| 43 | + "usage_limit_period": 6, |
| 44 | + "type": "model-default" |
| 45 | + }, |
| 46 | + "model-default": { |
| 47 | + "count_limit_period": 1, |
| 48 | + "usage_limit": 100000, |
| 49 | + "usage_limit_field": "total_tokens", |
| 50 | + "count_limit": 20, |
| 51 | + "usage_limit_period": 6, |
| 52 | + "type": "model-default" |
| 53 | + } |
| 54 | + }, |
| 55 | + "priceTimeBands": [ |
| 56 | + "standard" |
| 57 | + ], |
| 58 | + "capabilities": [ |
| 59 | + "TG" |
| 60 | + ], |
| 61 | + "versionTag": "MAJOR", |
| 62 | + "maxOutputTokens": 8192, |
| 63 | + "latestOnlineAt": "2024-11-11T16:00:00.000+00:00", |
| 64 | + "contextWindow": 131072, |
| 65 | + "maxInputTokens": 129024, |
| 66 | + "offlineInfo": { |
| 67 | + "inference": { |
| 68 | + "announceUrl": "https://www.aliyun.com/notice/118177", |
| 69 | + "offlineTime": "2026-10-10 00:00:00" |
| 70 | + } |
| 71 | + }, |
| 72 | + "inferenceProvider": "aliyun-bailian", |
| 73 | + "name": "Qwen-Coder-Plus", |
| 74 | + "docUrl": "https://help.aliyun.com/document_detail/2850166.html", |
| 75 | + "category": "Older", |
| 76 | + "samples": { |
| 77 | + "openai": { |
| 78 | + "completionsAPI": { |
| 79 | + "curl": "curl -X POST https://[workspace-id].cn-beijing.maas.aliyuncs.com/compatible-mode/v1/chat/completions \\\n-H \"Authorization: Bearer $DASHSCOPE_API_KEY\" \\\n-H \"Content-Type: application/json\" \\\n-d '{\n \"model\": \"qwen-coder-plus\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\", \n \"content\": \"你是谁?\"\n }\n ],\n \"stream\":true\n}'", |
| 80 | + "python": "import os\nfrom openai import OpenAI\n\nclient = OpenAI(\n # 若没有配置环境变量,请用百炼API Key将下行替换为:api_key=\"sk-xxx\",\n api_key=os.getenv(\"DASHSCOPE_API_KEY\"),\n base_url=\"https://[workspace-id].cn-beijing.maas.aliyuncs.com/compatible-mode/v1\",\n)\ncompletion = client.chat.completions.create(\n model=\"qwen-coder-plus\",\n messages=[\n {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n {\"role\": \"user\", \"content\": \"你是谁?\"},\n ],\n stream=True\n)\nfor chunk in completion:\n print(chunk.choices[0].delta.content, end=\"\", flush=True)", |
| 81 | + "nodejs": "import OpenAI from \"openai\";\nconst openai = new OpenAI(\n {\n // 若没有配置环境变量,请用百炼API Key将下行替换为:apiKey: \"sk-xxx\",\n apiKey: process.env.DASHSCOPE_API_KEY,\n baseURL: \"https://[workspace-id].cn-beijing.maas.aliyuncs.com/compatible-mode/v1\"\n }\n);\nconst completion = await openai.chat.completions.create({\n model: \"qwen-coder-plus\",\n messages: [\n { role: \"system\", content: \"You are a helpful assistant.\" },\n { role: \"user\", content: \"你是谁?\" }\n ],\n stream: true\n});\nfor await (const chunk of completion) {\n process.stdout.write(chunk.choices[0].delta.content);\n}", |
| 82 | + "docUrl": "https://help.aliyun.com/document_detail/3016807.html" |
| 83 | + } |
| 84 | + }, |
| 85 | + "dashscope": { |
| 86 | + "completionsAPI": { |
| 87 | + "curl": "curl --location \"https://[workspace-id].cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/text-generation/generation\" \\\n--header \"Authorization: Bearer $DASHSCOPE_API_KEY\" \\\n--header \"Content-Type: application/json\" \\\n--data '{\n \"model\": \"qwen-coder-plus\",\n \"input\":{\n \"messages\":[ \n {\n \"role\": \"system\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"你是谁?\"\n }\n ]\n },\n \"parameters\": {\n \"result_format\": \"message\"\n }\n}'", |
| 88 | + "python": "import os\nfrom dashscope import Generation\nimport dashscope\n\ndashscope.base_http_api_url = 'https://[workspace-id].cn-beijing.maas.aliyuncs.com/api/v1'\n\nmessages = [\n {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n {\"role\": \"user\", \"content\": \"你是谁?\"},\n]\nresponse = Generation.call(\n # 若没有配置环境变量,请用百炼API Key将下行替换为:api_key = \"sk-xxx\",\n api_key=os.getenv(\"DASHSCOPE_API_KEY\"),\n model=\"qwen-coder-plus\",\n messages=messages,\n result_format=\"message\",\n)\n\nprint(response.output.choices[0].message.content)", |
| 89 | + "java": "import java.util.Arrays;\nimport java.lang.System;\nimport com.alibaba.dashscope.aigc.generation.Generation;\nimport com.alibaba.dashscope.aigc.generation.GenerationParam;\nimport com.alibaba.dashscope.aigc.generation.GenerationResult;\nimport com.alibaba.dashscope.common.Message;\nimport com.alibaba.dashscope.common.Role;\nimport com.alibaba.dashscope.exception.ApiException;\nimport com.alibaba.dashscope.exception.InputRequiredException;\nimport com.alibaba.dashscope.exception.NoApiKeyException;\nimport com.alibaba.dashscope.protocol.Protocol;\n\npublic class Main {\n public static GenerationResult callWithMessage() throws ApiException, NoApiKeyException, InputRequiredException {\n Generation gen = new Generation(Protocol.HTTP.getValue(), \"https://[workspace-id].cn-beijing.maas.aliyuncs.com/api/v1\");\n Message systemMsg = Message.builder()\n .role(Role.SYSTEM.getValue())\n .content(\"You are a helpful assistant.\")\n .build();\n Message userMsg = Message.builder()\n .role(Role.USER.getValue())\n .content(\"你是谁?\")\n .build();\n GenerationParam param = GenerationParam.builder()\n // 若没有配置环境变量,请用百炼API Key将下行替换为:.apiKey(\"sk-xxx\")\n .apiKey(System.getenv(\"DASHSCOPE_API_KEY\"))\n .model(\"qwen-coder-plus\")\n .messages(Arrays.asList(systemMsg, userMsg))\n .resultFormat(GenerationParam.ResultFormat.MESSAGE)\n .build();\n return gen.call(param);\n }\n public static void main(String[] args) {\n try {\n GenerationResult result = callWithMessage();\n System.out.println(result.getOutput().getChoices().get(0).getMessage().getContent());\n } catch (ApiException | NoApiKeyException | InputRequiredException e) {\n System.err.println(\"错误信息:\"+e.getMessage());\n }\n }\n}", |
| 90 | + "docUrl": "https://help.aliyun.com/document_detail/3016809.html" |
| 91 | + } |
| 92 | + } |
| 93 | + } |
| 94 | + } |
| 95 | + ] |
| 96 | +} |
0 commit comments