Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ollam返回数据读取失败,接口已经走通了 #19

Open
magina000 opened this issue Dec 16, 2024 · 1 comment
Open

Ollam返回数据读取失败,接口已经走通了 #19

magina000 opened this issue Dec 16, 2024 · 1 comment

Comments

@magina000
Copy link

magina000 commented Dec 16, 2024

配置已经走通了,chat.vue的默认模型也需要修改为ollama3,但是执行默认问题
2、分别使用 Vue3 setup Composition API 语法糖、React 语法编写一个 Button 组件
还是会报转换失败,我看了下是转换函数的问题
我打印了下readValue数据,是因为流式数据挤在一起导致的吗,应该怎么优化?
image
image
image

@pdsuwwz
Copy link
Owner

pdsuwwz commented Dec 18, 2024

@magina000 你好,看了下你的描述,貌似是 ollama 返回的数据流不是一个完整的 json,不能直接使用 JSON.parse ,应该是返了类似于 spark 这些模型返回的数据流格式,可以尝试下直接使用 this.spark(readValue) 或使用 parseJsonLikeData 单独处理转换下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants