Comments (10)
Fresh Install git clone today 11.12.2023 => Error in Firefox Console
yarn dev
[NoScript]:0 Prompt Hook installation http://PRIVATE-IP_ADDRESS:5173/ [log.js:32:13] [vite] connecting... [client:229:9](http://PRIVATE-IP_ADDRESS:5173/@vite/client) [vite] connected. [client:324:21](http://PRIVATE-IP_ADDRESS:5173/@vite/client) Download the React DevTools for a better development experience: https://reactjs.org/link/react-devtools (http://PRIVATE-IP_ADDRESS:5173/node_modules/.vite/deps/chunk-BIYOIT3O.js?v=e7e990c6) Uncaught TypeError: crypto.randomUUID is not a function <anonymous> http://PRIVATE-IP_ADDRESS:5173/src/main.tsx:6 [main.tsx:6:48](http://PRIVATE-IP_ADDRESS:5173/src/main.tsx)
What can I do?
you could go to ./frontend/src/main.tsx and change to use uuid package as bellow:
import { v4 as uuidv4 } from "uuid";
....
if (document.cookie.indexOf("user_id") === -1) {
// document.cookie = opengpts_user_id=${crypto.randomUUID()}
;
document.cookie = opengpts_user_id=${uuidv4()}
;
}
*Note: use npm install uuid
for using uuid instead of crypto
Hope that help.
from opengpts.
As @tibraga said, if developing locally, route to http://localhost:{your_port} rather than http://0.0.0.0:{your_port}
However, fixing this during deployment is problem is a different issue
from opengpts.
It works for me! Now I can visit opengpts remotely! Amazing fix!
And I also changed all the crypto.randomUUID() to uuidv4() in frontend/src/hooks/useConfigList.ts
and frontend/src/hooks/useChatList.ts
. It's necessary to access opengpts remotely.
My environment: chrome (local) + docker (remote)
Thank you!
you could go to ./frontend/src/main.tsx and change to use uuid package as bellow:
import { v4 as uuidv4 } from "uuid"; .... if (document.cookie.indexOf("user_id") === -1) { // document.cookie =
opengpts_user_id=${crypto.randomUUID()}
; document.cookie =opengpts_user_id=${uuidv4()}
; }*Note: use
npm install uuid
for using uuid instead of cryptoHope that help.
from opengpts.
me too
from opengpts.
me too. Any suggestions?
from opengpts.
It's because the lib only works with localhost or https domain.
from opengpts.
我想部署到服务器上,但是就像上边所说的,我通过ip地址访问不到,这该怎么解决
from opengpts.
Any update on this?
from opengpts.
Fresh Install git clone today 11.12.2023 => Error in Firefox Console
yarn dev
[NoScript]:0 Prompt Hook installation http://PRIVATE-IP_ADDRESS:5173/ [log.js:32:13]
[vite] connecting... [client:229:9](http://PRIVATE-IP_ADDRESS:5173/@vite/client)
[vite] connected. [client:324:21](http://PRIVATE-IP_ADDRESS:5173/@vite/client)
Download the React DevTools for a better development experience: https://reactjs.org/link/react-devtools
(http://PRIVATE-IP_ADDRESS:5173/node_modules/.vite/deps/chunk-BIYOIT3O.js?v=e7e990c6)
Uncaught TypeError: crypto.randomUUID is not a function
<anonymous> http://PRIVATE-IP_ADDRESS:5173/src/main.tsx:6
[main.tsx:6:48](http://PRIVATE-IP_ADDRESS:5173/src/main.tsx)
What can I do?
from opengpts.
you could go to ./frontend/src/main.tsx and change to use uuid package as bellow:
import { v4 as uuidv4 } from "uuid"; .... if (document.cookie.indexOf("user_id") === -1) { // document.cookie =opengpts_user_id=${crypto.randomUUID()}
; document.cookie =opengpts_user_id=${uuidv4()}
; }
*Note: usenpm install uuid
for using uuid instead of crypto
Hope that help.
that helped me, thank you
from opengpts.
Related Issues (20)
- Assistant doesn't seem to have the ability to run Python code HOT 1
- Delete an assistant
- fix error please HOT 2
- Issue with Ingesting/Upserting CSV File in opengpts-backend HOT 2
- Sending a message in a deleted thread leads to a blank screen
- Sequential Custom Tool
- It always returns "Thread not found" by API
- services.postgres.healthcheck value 'start_interval' does not match any of the regexes: '^x-
- run example error
- Groq Provider
- YDC tool broken
- TypeError: string indices must be integers, not 'str' HOT 2
- error when adding message to thread HOT 4
- 'RedisCheckpoint' object has no attribute 'serde' Running Migration Tool HOT 1
- adding GPT4o support HOT 1
- how to limit token
- How to add new libraries to be used in custom tools?
- openai.NotFoundError: Error code: 404 - {'error': {'code': 'model_not_supported', 'param': None, 'message': 'Unsupported model `gpt-4-turbo` for OpenAI compatibility mode.', 'type': 'invalid_request_error'}}
- Feature Request: Support for Anthropic Claude 3.5 Sonnet and Groq Models
- How to use large model APIs such as Kimi, ChatGLM in frameworks.
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 opengpts.