Closed sprajosh closed 2 weeks ago
It looks like ollama has a streaming mode. I don't know if you want to add support for that
It looks like ollama has a streaming mode. I don't know if you want to add support for that
Yes, have added support for ollama.chat, ollama.chat with stream, ollama.Client.chat, ollama.AsyncClient.chat.
Awesome! Thanks for making the changes. Sorry I wasn't clear enough about token cost! I'll test this again if you can remove tokencost
If these secrets were true positive and are still valid, we highly recommend you to revoke them. Once a secret has been leaked into a git repository, you should consider it compromised, even if it was deleted immediately. Find here more information about risks.
๐ฆ GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
I just tested this and it works! Good work! ๐
I noticed that prompt tokens weren't being counted, but I suspect that's something I need to fix on the API server.
๐ฅ Pull Request
๐ Description Add support for Ollama support by patching the ollama.chat function.
๐ Related Issue (if applicable) Ollama support #192
๐ฏ Goal Add support for official Ollama python library.
๐ Additional Context Any extra information or context to help us understand the change?
๐งช Testing
This is a first draft. I'd like some feedback to understand if I'm missing something. ~Also, I don't see the analytics on session drill-down view. I will have to check the frontend project as well to see if this is happening because ollama is an unknown event.~
Todo
Dependencies ~https://github.com/AgentOps-AI/tokencost/pull/49 - Ollama support in tokencost to count token from message~ Token cost is calculated on server.