Delphic icon indicating copy to clipboard operation
Delphic copied to clipboard

api key headaches

Open bozo32 opened this issue 1 year ago • 10 comments

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

bozo32 avatar May 03 '23 19:05 bozo32

@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...

ProgramItUp avatar May 04 '23 02:05 ProgramItUp

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?

JSv4 avatar May 06 '23 06:05 JSv4

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.

ProgramItUp avatar May 06 '23 07:05 ProgramItUp

Bump - I have the same issue!

nima-airbus avatar Jun 07 '23 00:06 nima-airbus

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

JSv4 avatar Jun 07 '23 18:06 JSv4

Same issue here

a-romero avatar Jun 17 '23 13:06 a-romero

Same issue. Any fixes yet? Thank you.

rainwala avatar Jun 24 '23 12:06 rainwala

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

marauder37 avatar Jul 05 '23 23:07 marauder37

Same issue here, any updates?

andrea-DO avatar Jul 11 '23 16:07 andrea-DO

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.

marauder37 avatar Jul 12 '23 03:07 marauder37