Closed LingXuanYin closed 3 weeks ago
@LingXuanYin Thanks for the PR. by the way you need to add the node name to js file that trigger the model list refresh. its in the web/js
path.
why the addition of the retry?
@stavsap Thank you for reviewing my PR. I have added the new node name to web/js/OllamaNode.js
OllamaGenerateAdvance
node through the ComfyUI API, I encounter an error message 'KeyError: "eval_duration", which I cannot reproduce. It often appears without any reason. Adding retry is to facilitate the operation and maintenance of API users. Although WebUI users only need to click again when encountering errors, such errors will increase the workload of API users in operation and maintenance.sorry for using machine translation, my English is not good
by the way what is the difference between the generate api and chat? isnt generate works the same? in your code you dont store the messages so the chat history is reset on each call. in OllamaGenerateAdvance node there is an option to store context so it acts similar to chat history no?
Add two new nodes
OllamaOneRoundChat
andOllamaOneRoundChatAdvance
ollama.Client.chat Add retry whengenerate
orchat
get error Checkresponse
orresponse["message"]["content"]
before return Check response key when using Using logging instead print Rename fileCompfyuiOllama.py
->ComfyUI_Ollama.py