[personal profile] qse
Побольше всяких интеллектов...

Since the APIs of Qwen are OpenAI-API compatible, we can directly follow the common practice of using OpenAI APIs.

Below is an example of using Qwen2.5-Max in Python:


from openai import OpenAI
import os

client = OpenAI(
api_key=os.getenv("API_KEY"),
base_url="https://dashscope-intl.aliyuncs.com/compatible-mode/v1",
)

completion = client.chat.completions.create(
model="qwen-max-2025-01-25",
messages=[
{'role': 'system', 'content': 'You are a helpful assistant.'},
{'role': 'user', 'content': 'Which number is larger, 9.11 or 9.8?'}
]
)

print(completion.choices[0].message)

Date: 2025-01-31 02:13 am (UTC)
sobriquet9: (Default)
From: [personal profile] sobriquet9

Deepseek на этот вопрос правильно отвечает, даже в сильно урезанной версии. И не просто угадыванием, а с пошаговым описанием сравнения и проверки другим способом.

Profile

qse

March 2025

S M T W T F S
      1
2345678
910 1112131415
16171819202122
23242526272829
3031     

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 22nd, 2025 01:21 am
Powered by Dreamwidth Studios