-
Notifications
You must be signed in to change notification settings - Fork 56
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
Sending a message to the server and receiving a response in an external application? #30
Comments
@Regular-Baf |
I'm quite new to modding and programming in general so ChatGPT is doing the heavy lifting, but I'm writing the mod in Kotlin for Fabric. The code is all public here. I spent a few hours today and I've managed to get some basic functionality down, but the replies from the model are very hit and miss, likely a prompt template issue. I'd be down to discuss this project more, my Discord is Bafmaster#2997, or let me know if there is a better place to reach you :) |
@Regular-Baf friend request sent on Discord! |
Could you please provide an exaple call to the SSE completion endpoint? I am trying to call it using Python requests and sseclient but not able to make it work. Thanks! |
@FernandoFerrer it's a similar API to openai, here's the js call: https://github.com/louisgv/local.ai/blob/main/apps/desktop/src/features/thread/use-active-thread.ts#L82-L114 It's a data stream |
Thank you very much! Following your example I was able to make it work :) |
I think it would be awesome if we have a simple example python project or something like a streamlit playground for folks to quickly test out the API call. @FernandoFerrerTDK @Regular-Baf Would you guys be down publish an example github repo project? We can then link them in our github and frontpage as well. I know that @Regular-Baf got a working Kotlin client, and I think having both as an example would be huge! |
Maybe a wiki page on local.ai's own GitHub page would go a long way for helping with this? I'd absolutely be happy for my code to be used there as an example. This is the part of my mod which handles the API call. |
Just enabled wiki: https://github.com/louisgv/local.ai/wiki |
I think the whole idea behind having the user's computer handle the compute for AI-powered applications is quite awesome, so I've decided to try and build a Minecraft mod around it. The application seems to host a server, but I was just wondering how to correctly send and receive ?
The text was updated successfully, but these errors were encountered: