‘xiarui’
init
25d0227
raw
history blame contribute delete
307 Bytes
from pygpt4all.models.gpt4all import GPT4All
def new_text_callback(text):
print(text, end="")
model = GPT4All('E:\ProjectEX\AnaGPT\models\chat_llama_zh\chat-llama-zh-7b-int4\chatllama-ggml-q4_0.bin')
model.generate("who are you?(answer in english)", n_predict=55, new_text_callback=new_text_callback)