gpt4 book ai didi

gpt-3 - GPT4 - 无法获得问题的答复?

转载 作者:行者123 更新时间:2023-12-02 22:47:14 26 4
gpt4 key购买 nike

由于标题清楚地描述了我遇到的问题,因此我无法从我使用 nomic-ai/gpt4all 使用的数据集中得到问题的答复。执行就停止了。没有出现异常。我该如何克服这种情况?

附:我使用 GPT4 的离线模式,因为我需要处理大量问题。

附: 一段时间后会出现此问题。某些原因阻止 GPT4All 生成给定问题的响应。

question = 'Was Avogadro a  professor at the University of Turin?'
gpt = GPT4All()
gpt.open()
resp = gpt.prompt(question)
print(f'Response: {resp}') # --> the execution does not reach here

最佳答案

这适用于我的 Windows 笔记本电脑。使用pygpt4all,基于此:https://github.com/nomic-ai/pygpt4all .

from pygpt4all.models.gpt4all_j import GPT4All_J

def new_text_callback(text):
print(text, end="")


model = GPT4All_J('./models/ggml-gpt4all-j-v1.3-groovy.bin')
model.generate("Was Avogadro a professor at the University of Turin?", n_predict=55, new_text_callback=new_text_callback)

输出:

Was Avogadro a  professor at the University of Turin? If so, can you give me the name of his field of research? And did he publish any papers?<|endoftext|>

关于gpt-3 - GPT4 - 无法获得问题的答复?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/76100892/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com