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

/uploadfile 401 Unauthorized (Invalid Authorization credentials) #498

Open
jackgofff opened this issue Dec 26, 2023 · 2 comments
Open

/uploadfile 401 Unauthorized (Invalid Authorization credentials) #498

jackgofff opened this issue Dec 26, 2023 · 2 comments

Comments

@jackgofff
Copy link

jackgofff commented Dec 26, 2023

I logged in side by side on both my localhost (Firebase successfully registering and configured in client/next-web/.env) and the realchar.ai site. Problem: cannot create characters on localhost

On my localhost:
I am concurrently running the server via python cli.py run-uvicorn and client via cd client/next-web && npm install && npm run dev . When I try to create a character, I get these errors for /uploadfile (same applies to the /system_prompt, create_character, and upload_image ):

image Screenshot 2023-12-25 at 11 08 07 PM

--------- VS-----------

On the realchar.ai live site:

Creating character works without issue.
image
image

💡initial ideas (?):
- related to Request URL? ( http://127.0.0.0.1:8000/uploadfile vs https://api.realchar.ai/uploadfile)
- Enviornment configurations / variables
- Token refresh logic (see below)

One difference I see the token?key=.... row circled in red, both the Headers and the Payload:

image image
@y1guo
Copy link
Collaborator

y1guo commented Dec 26, 2023

Hi Jack, glad to help!

/uploadfile sends your file to a GCP storage bucket. To use it locally, you'll need to get your own GCP storage bucket, and configure it in .env. A google_credentials.json file is also needed to prove your admin. Put the file under root directory of repo, and also enable GOOGLE_APPLICATION_CREDENTIALS=google_credentials.json in .env. It should work.

@jackgofff
Copy link
Author

Ty! I got it to work! A few questions:

  • I am working on the codebase I cloned 1week ago (before the latest changes with Rebyte). Will I have issues (I am a paying Rebyte member and love it, but for this project I would like to use without Rebyte)? If there are things I should know, lmk
  • I want to fully self-host this project. After setting up the Firebase, GCP bucket, I believe next step is configuring Nginx and then Kubernetes. Is there anything else in the stack / backend infrastructure you guys are using for the realchar.ai public live site and if so, what is the path I should take forward?

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