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

Cant use openwebui api. #786

Open
wangyuc opened this issue Dec 17, 2024 · 1 comment
Open

Cant use openwebui api. #786

wangyuc opened this issue Dec 17, 2024 · 1 comment

Comments

@wangyuc
Copy link

wangyuc commented Dec 17, 2024

Describe the bug

OPENAI_LIKE_API_BASE_URL=http://10.231.20.101:17000/api/chat/completions
or
OPENAI_LIKE_API_BASE_URL=http://10.231.20.101:17000/api/
console error:

WARN Constants Failed to get Ollama models: fetch failed
Error getting OpenAILike models: SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse ()
at parseJSONFromBytes (node:internal/deps/undici/undici:5584:19)
at successSteps (node:internal/deps/undici/undici:5555:27)
at fullyReadBody (node:internal/deps/undici/undici:1665:9)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at specConsumeBody (node:internal/deps/undici/undici:5564:7)
at Object.getOpenAILikeModels [as getDynamicModels] (D:/DevCode/WebDev/bolt.diy-0.0.2/app/utils/constants.ts:427:17)
at async Promise.all (index 1)
at Module.initializeModelList (D:/DevCode/WebDev/bolt.diy-0.0.2/app/utils/constants.ts:483:9)
at handleRequest (D:/DevCode/WebDev/bolt.diy-0.0.2/app/entry.server.tsx:30:3)
at handleDocumentRequest (D:\DevCode\WebDev\bolt.diy-0.0.2\node_modules.pnpm@[email protected][email protected]\node_modules@remix-run\server-runtime\dist\server.js:340:12)
at requestHandler (D:\DevCode\WebDev\bolt.diy-0.0.2\node_modules.pnpm@[email protected][email protected]\node_modules@remix-run\server-runtime\dist\server.js:160:18)
at D:\DevCode\WebDev\bolt.diy-0.0.2\node_modules.pnpm@remix-run+dev@2.15.0_@remix-run[email protected][email protected]_react@[email protected]_typ_3djlhh3t6jbfog2cydlrvgreoy\node_modules@remix-run\dev\dist\vite\cloudflare-proxy-plugin.js:70:25
TypeError: fetch failed
at node:internal/deps/undici/undici:12618:11
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Object.getOpenRouterModels [as getDynamicModels] (D:\DevCode\WebDev\bolt.diy-0.0.2\app\utils\constants.ts:470:5)
at async Promise.all (index 2)
at Module.initializeModelList (D:\DevCode\WebDev\bolt.diy-0.0.2\app\utils\constants.ts:525:7)
at handleRequest (D:/DevCode/WebDev/bolt.diy-0.0.2/app/entry.server.tsx:30:3)
at handleDocumentRequest (D:\DevCode\WebDev\bolt.diy-0.0.2\node_modules.pnpm@[email protected][email protected]\node_modules@remix-run\server-runtime\dist\server.js:340:12)
at requestHandler (D:\DevCode\WebDev\bolt.diy-0.0.2\node_modules.pnpm@[email protected][email protected]\node_modules@remix-run\server-runtime\dist\server.js:160:18)
at D:\DevCode\WebDev\bolt.diy-0.0.2\node_modules.pnpm@remix-run+dev@2.15.0_@remix-run[email protected][email protected]_react@[email protected]_typ_3djlhh3t6jbfog2cydlrvgreoy\node_modules@remix-run\dev\dist\vite\cloudflare-proxy-plugin.js:70:25 {
cause: ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (node:internal/deps/undici/undici:7760:28)
at node:internal/deps/undici/undici:7716:50
at Immediate._onImmediate (node:internal/deps/undici/undici:7746:37)
at processImmediate (node:internal/timers:476:21)
at process.topLevelDomainCallback (node:domain:161:15)
at process.callbackTrampoline (node:internal/async_hooks:126:24) {
code: 'UND_ERR_CONNECT_TIMEOUT'
}
}

Link to the Bolt URL that caused the error

http://127.0.0.1:5173

Steps to reproduce

1..env.local :OPENAI_LIKE_API_BASE_URL=http://10.231.20.101:17000/api/chat/completions
2. .env.local OPENAI_LIKE_API_KEY=xxxx
3.pnpm run dev

Expected behavior

Normal running 。

Screen Recording / Screenshot

No response

Platform

  • OS: [ Windows11]
  • Browser: [Edge]
  • Version: [0.0.2]

Provider Used

No response

Model Used

No response

Additional context

No response

@dustinwloring1988
Copy link
Collaborator

this might be a good provider to add, ill look into it when I have a change unless someone beats me to it.

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