def is_palindrome(s):
cleaned = ''.join(ch.lower() for ch in s if ch.isalnum())
return cleaned == cleaned[::-1]
print(is_palindrome("A man, a plan, a canal: Panama")) # True
print(is_palindrome("race a car")) # False
print(is_palindrome("上海自来水来自海上")) # True
from openai importOpenAI
client = OpenAI(
base_url="https://api.routemux.com/v1",
api_key="<ROUTEMUX_KEY>",
)
completion = client.chat.completions.create(
model="deepseek/deepseek-v4-pro",
messages=[{"role": "user", "content": "What is the meaning of life?"}],
)
print(completion.choices[0].message.content)
base_url: https://api.routemux.com/v1
性能数据 (近 30 天)
相关模型
DeepSeek V4 Pro 常见问题
›DeepSeek V4 Pro 是什么?
DeepSeek V4 Pro — V4 旗舰推理模型,1M 上下文,极低成本。
›DeepSeek V4 Pro 的上下文窗口有多大?
DeepSeek V4 Pro 支持最多 1M tokens 的上下文窗口,单次最多输出 384K tokens。