20 lines
361 B
Python
20 lines
361 B
Python
import ollama
|
|
|
|
|
|
if __name__ == "__main__":
|
|
pass
|
|
|
|
# 读取整个文件内容
|
|
content = file.read()
|
|
|
|
# 打印文件内容
|
|
print(content)
|
|
|
|
# 关闭文件 (非常重要!)
|
|
file.close()
|
|
|
|
response = ollama.generate(
|
|
model="gemma3:12b-it-q8_0",
|
|
prompt="我上一个问题是什么"
|
|
)
|
|
print(response["response"]) |