问HN:将用户输入传递给Ollama安全吗?有没有办法对其进行清理?
我想将用户查询传递给运行小模型的ollama,但ollama确实有一个复杂的分词流程。多年来,大多数处理用户输入的软件都发现存在缺陷,我能做些什么来清理用户输入,以便在传递给ollama之前避免问题?或者,我可以认为ollama的解析本身对格式不正确的用户输入是免疫的吗?
查看原文
I'd like to give user queries to ollama running a small model, but ollama does have a complex tokenization pipeline. Most software that processes user input has turned out to have flaws over the years, is there anything I can do to sanitize users' input before I pass it on to ollama, or anything else I can do to avoid this? Or, can I consider ollama's parsing itself to be immune to errors from malformed user input?