Files
knightutils/test/llamaindex/test_20250826_1.ipynb
2025-08-27 22:21:14 +08:00

53 lines
1.0 KiB
Plaintext

{
"cells": [
{
"metadata": {},
"cell_type": "raw",
"source": [
"from llama_index.llms.dashscope import DashScope\n",
"from llama_index.llms.openai import OpenAI\n",
"\n",
"llm = DashScope(model_name=\"qwen-max\") # 设置检索引擎生成回答时调用的大模型。"
],
"id": "a5d3b9e1d4e6588f"
},
{
"cell_type": "code",
"id": "initial_id",
"metadata": {
"collapsed": true,
"jupyter": {
"is_executing": true
}
},
"source": [
"response = llm.complete(\"William Shakespeare is \")\n",
"print(response)"
],
"outputs": [],
"execution_count": null
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}