-
Notifications
You must be signed in to change notification settings - Fork 28
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
Linux support #45
Comments
Hi @danpalmer I think this should be possible to do. As far as I have seen, the code provides both APIs natively. I will let you know when I have something to test... Kind regards |
OK... it is not that easy... Probably See my "work in progress PR" #48, where I use Github Actions for testing Swift on Linux 😉 |
After looking more into details, I know that I had to use where those #if canImport(FoundationNetworking)
import FoundationNetworking
#endif Now I'm at a point where the async "convenience method" Tomorrow I will look into whether I can somehow "simulate" the same API using I've just found this: swiftlang/swift-corelibs-foundation#4972 |
I think, I have a working solution... probably I need to clean it up some more. I would like to do some more testing, but I don't know how... I've only tested in on Mac and used it in an Ollamac for testing. The streaming did work properly. Using GitHub actions, I can confirm, that the package successfully builds on Linux... that's all I can do for the moment. @danpalmer : Can you help out? |
Will give this a go, thanks! To set expectations, I'm travelling for a few days and without stable internet, and my own Linux build is a day or so of work away from working, so between that and work it might be a little while until I can give this a go. That said, if it builds and the test suite passes, it's probably all good! |
Test suite? You probably haven’t looked at https://github.com/kevinhermawan/OllamaKit/tree/main/Tests/OllamaKitTests yet 😜 |
Great news: I made progress in debugging the Linux issues. |
Hey! It would be great to get Linux support in OllamaKit.
Currently there's a dependency on Combine, which is an Apple OS proprietary framework, rather than a Swift framework. This means that it can only compile for Apple platforms, and not Linux or Windows.
With the increasing use of Swift on the server, Linux support in particular would be great to have. I'm working on a Swift web application that uses Ollama, and have so far used OllamaKit without realising it had this dependency (my own fault!).
How amenable is the project to dropping the Combine dependency? If that's a hard-no, no worries, I can look for alternatively or fork the library.
The text was updated successfully, but these errors were encountered: