Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

api key headaches #37

Open
bozo32 opened this issue May 3, 2023 · 10 comments · May be fixed by #85 or #89
Open

api key headaches #37

bozo32 opened this issue May 3, 2023 · 10 comments · May be fixed by #85 or #89

Comments

@bozo32
Copy link

bozo32 commented May 3, 2023

Hi
I managed to get it up and running fairly easily on a M1 Mac.
the only issue I'm having is that when I go to index a newly uploaded collection
it seems that there is an issue with API key authentication
I'm working with a known good OpenAI key
delphic_local_flower | INFO 2023-05-03 19:50:58,704 mixins 112 281472944230880 Connected to redis://redis:6379/0
delphic_local_django | API KEY authenticatE: yaddah
delphic_local_django | WARNING 2023-05-03 19:51:10,506 api_key 1yaddah INVALID KEY! - Error: APIKey matching query does not exist.
delphic_local_django | API KEY: None
delphic_local_django | INFO: 172.18.0.1:34644 - "GET /api/collections/available HTTP/1.1" 200 OK

@ProgramItUp
Copy link

@JSv4 Any thoughts?

I'm experiencing the same problem. The UI fails silently.
The docker container has my proper OPENAI_API_KEY as validated by "echo $OPENAI_API_KEY"

The error is:
INFO 2023-05-04 02:22:09,066 mixins 170 140046759876352 Connected to redis://redis:6379/0
delphic_local_celeryworker | [2023-05-04 02:22:12,845: ERROR/ForkPoolWorker-32] Error creating index for collection 3: 1 validation error for OpenAI
delphic_local_celeryworker | root
delphic_local_celeryworker | Did not find openai_api_key, please add an environment variable OPENAI_API_KEY which contains it, or pass openai_api_key as a named parameter. (type=value_error)
delphic_local_celeryworker | [2023-05-04 02:22:12,853: INFO/ForkPoolWorker-32] Task delphic.tasks.index_tasks.create_index[af9ddc52-004f-4fe2-b773-13acb763a68f] succeeded in 7.642851721961051s: False
delphic_local_django | API KEY authenticatE: e...... stuff......oRSA
delphic_local_django | WARNING 2023-05-04 02:22:20,466 api_key 53 140605927102272 INVALID KEY! - Error: APIKey matching query does not ex...

@JSv4
Copy link
Owner

JSv4 commented May 6, 2023

Hey @ProgramItUp, this is a bug, but shouldn't be impacting collection creation. The REST API (not the websocket) has an optional API_KEY auth instead of a JWT token. It looks like it's still throwing an error message even when the JWT auth works. I don't think this is actually affecting anything. Obviously something that should be fixed, but I'm pretty sure you can ignore this. Is the applications working apart from this message?

@ProgramItUp
Copy link

Hi @JSv4, thanks.
For clarity, this error is thrown right after creating a collection .

I am not able to use the application.
After creating a collection the collection name is grey, not black, and cannot be selected or dragged into the main window as you demonstrate in the video.
So, there is something which prevents the collection from being selectable.

I’m hoping we can figure out what the bug is.

@nima-airbus
Copy link

Bump - I have the same issue!

@JSv4
Copy link
Owner

JSv4 commented Jun 7, 2023

Thanks, everyone. I'm working on a number of fixes, this included.

@a-romero
Copy link

Same issue here

@rainwala
Copy link

Same issue. Any fixes yet? Thank you.

@marauder37 marauder37 linked a pull request Jul 4, 2023 that will close this issue
@marauder37
Copy link

You're welcome to test my PR that should fix this @rainwala @a-romero @nima-airbus @ProgramItUp

@andrea-DO
Copy link

Same issue here, any updates?

@marauder37
Copy link

Same issue here, any updates?

You don't need to ask if there are any updates, you can check the repo commit history and see.

Also see https://github.com/JSv4/Delphic/pull/85/files for how to fix it yourself.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
8 participants