Comments (17)
构建Knowledge Base的时候出现问题
Created knowledge base hj3: [object Object]
Warning: TT: undefined function: 32
Warning: TT: undefined function: 3
[nuxt] [request error] [unhandled] [500] Chroma getOrCreateCollection error: Error: TypeError: fetch failed
at Chroma.ensureCollection (/E:/chat-ollama/chat-ollama-main/node_modules/@langchain/community/dist/vectorstores/chroma.js:99:23)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Chroma.fromExistingCollection (/E:/chat-ollama/chat-ollama-main/node_modules/@langchain/community/dist/vectorstores/chroma.js:274:9)
at ingestDocument (E:\chat-ollama\chat-ollama-main\server\api\knowledgebases\index.post.ts:25:1)
at Object.handler (E:\chat-ollama\chat-ollama-main\server\api\knowledgebases\index.post.ts:92:1)
at async Object.handler (/E:/chat-ollama/chat-ollama-main/node_modules/h3/dist/index.mjs:1962:19)
at async Server.toNodeHandle (/E:/chat-ollama/chat-ollama-main/node_modules/h3/dist/index.mjs:2249:7)
另外,已经构建的Knowledge Base怎么删除啊。。。
from chat-ollama.
E:\chat-ollama\chat-ollama-main>npm run prisma-migrate
prisma-migrate
prisma migrate devPrisma schema loaded from prisma\schema.prisma Datasource "sqlite": SQLite database
Error: Prisma schema validation - (get-config wasm) Error code: P1012 error: Environment variable not found: DATABASE_URL. --> schema.prisma:3 | 2 | provider = "sqlite" 3 | url = env("DATABASE_URL") |
Validation Error Count: 1 [Context: getConfig]
Prisma CLI Version : 5.10.2
看来我必须要更新下文档了。
这个问题是因为没有环境变量DATABASE_URL
参考以下 .env.example
,在你的E:\chat-ollama\chat-ollama-main下创建一个 .env
文件。.env 文件中的 DATABASE_URL
可以设置为你期望放置sqlite文件的路径。
DISABLE_VERCEL_ANALYTICS=false
OPENAI_API_KEY=
DATABASE_URL=/Users/xyz/private/chatollama.sqlite
from chat-ollama.
这个暂时没有,我来加下这个功能吧😁
from chat-ollama.
看起来应该是SQLite数据库没有创建。
运行以下命令再尝试下。
npm run prisma-migrate
我会尽快更新文档。
from chat-ollama.
E:\chat-ollama\chat-ollama-main>npm run prisma-migrate
prisma-migrate
prisma migrate dev
Prisma schema loaded from prisma\schema.prisma
Datasource "sqlite": SQLite database
Error: Prisma schema validation - (get-config wasm)
Error code: P1012
error: Environment variable not found: DATABASE_URL.
--> schema.prisma:3
|
2 | provider = "sqlite"
3 | url = env("DATABASE_URL")
|
Validation Error Count: 1
[Context: getConfig]
Prisma CLI Version : 5.10.2
from chat-ollama.
问题解决了,感谢^^
from chat-ollama.
我也一样 500 Chroma getOrCreateCollection error fetch failed.
已经构建的 Knowledge Base 重新创建数据库并清理浏览器缓存(localstorage)
from chat-ollama.
我的是在 server\api\models\chat\index.post.ts 第 50 行左右的 new Chroma 中增加 url 参数指向 chromadb 地址可以解决。
你这样应该是在 server\api\knowledgebases\index.post.ts 给 chromedb 设置 url 参数,应该是 dbConfig 变量里面
from chat-ollama.
DATABASE_URL="file:/Users/xyz/private/chatollama.sqlite"
npm run prisma-migrate
prisma-migrate
prisma migrate devEnvironment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "sqlite": SQLite databaseError: Prisma schema validation - (get-config wasm)
Error code: P1012
error: Error validating datasourcesqlite
: the URL must start with the protocolfile:
.
--> schema.prisma:3
|
2 | provider = "sqlite"
3 | url = env("DATABASE_URL")
|Validation Error Count: 1
[Context: getConfig]Prisma CLI Version : 5.10.2
from chat-ollama.
我也遇到这个问题
from chat-ollama.
@jiyzhang @xiaojiegogogo
DATABASE_URL="file:/Users/xyz/private/chatollama.sqlite"
这个是 demo 地址,可能你电脑实际上没有这个文件路径,可以将配置改成:
DATABASE_URL=file:../../chatollama.sqlite
然后再执行:
npm run prisma-migrate
from chat-ollama.
@jiyzhang @xiaojiegogogo
DATABASE_URL="file:/Users/xyz/private/chatollama.sqlite"
是demo地址,可能你电脑上实际上没有这个文件路径,可以将配置改成:
DATABASE_URL=file:../../chatollama.sqlite
然后再执行:
npm run prisma-migrate
嗯嗯,是可以了,我想知道我怎么默认模型啊,就不选择了,先来个默认的
from chat-ollama.
我的是在 server\api\models\chat\index.post.ts 第 50 行左右的 new Chroma 中增加 url 参数指向 chromadb 地址可以解决。 你这样应该是在 server\api\knowledgebases\index.post.ts 给 chromedb 设置 url 参数,应该是 dbConfig 变量里面
请问具体应该如何操作呢
from chat-ollama.
@izonewonyoung 可以打开浏览器访问一下 http://localhost:8000/ 看看能否连通,正常情况如下图:
如果不能访问,有可能是你的 ChromaDB 端口(默认就是8000)问题,也有可能是 ChromaDB 没有正常运行
from chat-ollama.
@izonewonyoung 可以打开浏览器访问一下 http://localhost:8000/ 看看能否连通,正常情况如下图:
如果不能访问,有可能是你的 ChromaDB 端口(默认就是8000)问题,也有可能是 ChromaDB 没有正常运行
from chat-ollama.
如果没有安装 ChromaDB ,先安装 docker ,再执行下面命令:
docker pull chromadb/chroma
docker run -d -p 8000:8000 chromadb/chroma
from chat-ollama.
如果没有安装 ChromaDB ,先安装 docker ,再执行下面命令:
docker pull chromadb/chroma docker run -d -p 8000:8000 chromadb/chroma
问题解决了,十分感谢!!!^^
from chat-ollama.
Related Issues (20)
- 基于URL创建知识库,当设置maxDepth大于0时,抓取并索引的链接少于预期 HOT 1
- ChatOllama is unable to establish a connection with http://host.docker.internal:11434 HOT 1
- Chroma getOrCreateCollection error: Error: AttributeError("type object 'CreateCollection' has no attribute 'model_validate'" HOT 3
- 添加知识库报错 HOT 1
- 创建个人知识库,embeding模型选择,无法选择本地下载的模型,请问一下这是什么原因? HOT 3
- 创建知识库不成功,求助? HOT 2
- [FR] Ollama 模型参数设置 HOT 4
- 第三方模型API支持的模型列表通过API调用动态获取
- 增加响应式支持,适配移动端
- 对兼容OpenAI的API的支持 HOT 2
- docker container無法連接到本機端的ollama HOT 4
- Response "Oops! Response Exception", when chat with knowledgebase HOT 5
- 国际化支持 HOT 5
- 知识库创建的高级配置
- Ollama的聊天补全中指定max_token
- 聊天设置 - temperature
- Function ask:How to chat with obsidian and ollama(local language model)?
- oneapi第三方代理服务出现问题 HOT 4
- [FR] 非RAG,全库对话 HOT 2
- Error: while creating KnowledgeBase HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chat-ollama.