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

High API usage? #45

Open
Helmasko opened this issue Oct 30, 2023 · 5 comments
Open

High API usage? #45

Helmasko opened this issue Oct 30, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@Helmasko
Copy link

Helmasko commented Oct 30, 2023

I noticed using unsaged.com does a lot of API requests even with very short conversations which shouldn't cost as much. I can see $0.10 increase after 10-30 mins of having used the tool (1 or 2 messages only).

@jorge-menjivar
Copy link
Owner

What’s your OS/browser? I was analyzing streaming messages this past week trying to fix a streaming bug and did not notice anything out of the ordinary. I will still try to reproduce with your setup and see if it’s browser related (maybe sending double requests or something)

@Helmasko
Copy link
Author

Windows 11, Microsoft Edge Stable. I just tried it again on a chat with some backlog (10 or so messages) and got a $0.03 increase.

  1. Check usage
  2. Send a single message totalling to 11 tokens (including the response I got)
  3. Wait 10-30 minutes (it doesn't happen instantly)
  4. Check usage and compare with before

@jorge-menjivar
Copy link
Owner

So I did some tests and was not able to see any issues.

I sent two messages. The first request had 38 tokens and the second one had 59 tokens. The second message was a reply to the first message.

Here are the results:

Screenshot from 2023-11-05 12-01-40
Screenshot from 2023-11-05 12-01-14

The requests were not sent multiple times. They both also had the correct number of tokens.

@jorge-menjivar
Copy link
Owner

See if you can test it as well. The newest commit turned on printing the tokenCount by default.

@sebiweise
Copy link
Collaborator

sebiweise commented Nov 19, 2023

You could try to use https://developers.cloudflare.com/ai-gateway/ for your unsaged instance so you can check what requests are coming from that instance and what request could come from something else. I just added a short docs entry regarding that #82

@Bortus-AI Bortus-AI added the bug Something isn't working label Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants