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

How do I set the variable "user" or "system" for AI inference #262

Open
Silverdutchman opened this issue Jun 30, 2024 · 6 comments
Open

Comments

@Silverdutchman
Copy link

Hello,

I use Perplexity to connect Hoarder. But I get the following error message.

2024-06-30T08:42:33.745Z error: [inference][31] inference job failed: Error: 400 Last message must have role user.

it seems that Perplexity, that's how I interpretate it, need the variabele "role" to be set. My question is: how and where can I do that in the config?

@kamtschatka
Copy link
Contributor

Perplexity is not on the supported list, what gives you reason to believe, that this should work?

@MohamedBassem
Copy link
Collaborator

@kamtschatka we support openAI compatible APIs and perplexity is one of them (https://docs.perplexity.ai/docs/getting-started)

@Silverdutchman
Copy link
Author

@kamtschatka I never stated that I believed that Perplexity is supported, although it is an openAI compatible API that is supported by the Hoarder Team, that doesn't mean I should/could work out of the box. Hence the question, nothing more and nothing less 🙏

@MohamedBassem thank you for the clarification, it was the foundation on why I asked this.

@kamtschatka
Copy link
Contributor

@MohamedBassem we should probably update that then and state that we only support OpenAI. It doesn't work for #137 and it does not work here.

@MohamedBassem
Copy link
Collaborator

@kamtschatka If it doesn't work for azure and doesn't work for perplexity, it doesn't mean that it doesn't work for other openAI compatible APIs.
I'd argue that the problem here is that perplexity is out of spec (or more restrictive) than openAI.

@Silverdutchman I don't think the problem here is a variable that you have to tune or a role that you have to set. It's probably because we're requesting the inference with the message having the role system here (https://github.com/hoarder-app/hoarder/blob/main/apps/workers/inference.ts#L46) while perplexity wants it to be user instead of system. I think user should work, I'm just a bit concerned if this might degrade the inference performance in any ways.

@MohamedBassem
Copy link
Collaborator

I'm happy to try to changing the role to user, I don't expect this to cause problems.

kamtschatka added a commit to kamtschatka/hoarder-app that referenced this issue Oct 18, 2024
MohamedBassem pushed a commit that referenced this issue Oct 19, 2024
…569)

* How do I set the variable "user" or "system" for AI inference #262
changed from system to user

* [Feature Request] Log failed login attempts for fail2ban implementation
#477
added logging of failed logins

* [Feature Request] Log failed login attempts for fail2ban implementation #477
added more logging for extension related logins

* Propagte IP to trpc

---------

Co-authored-by: Your Name <you@example.com>
MohamedBassem added a commit that referenced this issue Oct 19, 2024
…new users. Fixes #495  (#567)

* How do I set the variable "user" or "system" for AI inference #262
changed from system to user

* Make Myself an Admin #560
added  user management functionality to the admin page

* A bunch of UI fixes and simplifications

---------

Co-authored-by: Mohamed Bassem <me@mbassem.com>
MohamedBassem pushed a commit that referenced this issue Oct 27, 2024
* How do I set the variable "user" or "system" for AI inference #262
changed from system to user

* added FAQ regarding user management
kamtschatka added a commit to kamtschatka/hoarder-app that referenced this issue Nov 2, 2024
…er-app#477 (hoarder-app#569)

* How do I set the variable "user" or "system" for AI inference hoarder-app#262
changed from system to user

* [Feature Request] Log failed login attempts for fail2ban implementation
hoarder-app#477
added logging of failed logins

* [Feature Request] Log failed login attempts for fail2ban implementation hoarder-app#477
added more logging for extension related logins

* Propagte IP to trpc

---------

Co-authored-by: Your Name <you@example.com>
kamtschatka added a commit to kamtschatka/hoarder-app that referenced this issue Nov 2, 2024
…new users. Fixes hoarder-app#495  (hoarder-app#567)

* How do I set the variable "user" or "system" for AI inference hoarder-app#262
changed from system to user

* Make Myself an Admin hoarder-app#560
added  user management functionality to the admin page

* A bunch of UI fixes and simplifications

---------

Co-authored-by: Mohamed Bassem <me@mbassem.com>
kamtschatka added a commit to kamtschatka/hoarder-app that referenced this issue Nov 2, 2024
* How do I set the variable "user" or "system" for AI inference hoarder-app#262
changed from system to user

* added FAQ regarding user management
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

3 participants