Skip to content

add plugin GLPI AI #105

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

Merged
merged 5 commits into from
Mar 12, 2024
Merged

add plugin GLPI AI #105

merged 5 commits into from
Mar 12, 2024

Conversation

Otijom
Copy link
Collaborator

@Otijom Otijom commented Mar 6, 2024

No description provided.

@Otijom Otijom requested a review from trasher March 6, 2024 16:24
@Otijom Otijom marked this pull request as ready for review March 6, 2024 16:25
@Otijom Otijom requested review from orthagh and cconard96 March 6, 2024 16:25
:scale: 100 %

1. In usage limit, indicate a value not to be exceeded. If this limit is accrossed, the plugin will no longer work until it is increased.
2. Indicate the real value of your API Key (https://platform.openai.com/usage). This value must be updated when the plugin usage data is not coordinated with the real API value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't sound right, but I don't know what it is referring to in order to make a suggestion.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't sound right, but I don't know what it is referring to in order to make a suggestion.

Hello Curtis, thanks for your feedback. I have tried to write this article without translation, not a good idea 😬. In the plugin, if you don't want to exceed a limit, you can setup one. there's a text already proposed but I didn't want to copy and paste it
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If message is relevant, why not copy paste it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 1st is not present in GLP, I wrote it, the 2nd is present but there's just one word that's been changed in fact

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just changed the text, does that make it clearer?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, and after looking at the plugin code I am still confused by the purpose of the second usage field. I can see that the custom usage is added when determining the total usage, but I don't know why it would be needed. Is it in case the API key is used outside of the AI plugin?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think that's right. This value has to be updated manually if it doesn't correspond to the actual usage value (in the case where, as you say, the API is used elsewhere). If I add a value to this field, the usage rate increases proportionally.

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After more research, it looks like OpenAI doesn't have any way to check the tokens used per-API key. So this plugin keeps track of the tokens that the API responses say were used. I think this needs clarified better here. On the plugin side the tooltip for the usage "progress" says "Usage is linked only to this instance of the plugin. If plugin is uninstalled, usage data will be lost." which is OK.

trasher and others added 2 commits March 7, 2024 08:19
Co-authored-by: Curtis Conard <cconard96@gmail.com>
Co-authored-by: Curtis Conard <cconard96@gmail.com>
@trasher trasher merged commit d81b0a0 into master Mar 12, 2024
@trasher trasher deleted the glpiai branch March 12, 2024 08:20
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

Successfully merging this pull request may close these issues.

3 participants