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

Ollama Integration #132

Merged
merged 59 commits into from
Jan 3, 2024

Conversation

AlistairLR112
Copy link
Contributor

@AlistairLR112 AlistairLR112 commented Dec 20, 2023

My incomplete attempt at the Ollama Integration to complement @sachinsachdeva
#126

Referring to this:
#146

@CLAassistant
Copy link

CLAassistant commented Dec 20, 2023

CLA assistant check
All committers have signed the CLA.

@anakin87
Copy link
Member

anakin87 commented Dec 27, 2023

Hello, @AlistairLR112 and @sachinsachdeva...
This is a nice attempt!

I also created an issue in this repo (#146) that reminds us what we should do to declare the integration done.
(Some actions are on our end).
Let's iterate on your draft...

  • (please sign the CLA agreement)
  • please add the LICENSE file to the root folder of the project
  • let's remove integrations/ollama/init.py
  • to make the tests run, you should create a workflow here. You can take the Elasticsearch workflow as an example.
  • I will also leave some comments in the code...

integrations/ollama/pyproject.toml Outdated Show resolved Hide resolved
integrations/ollama/src/ollama_haystack/__about__.py Outdated Show resolved Hide resolved
integrations/ollama/src/ollama_haystack/generator.py Outdated Show resolved Hide resolved
integrations/ollama/src/ollama_haystack/generator.py Outdated Show resolved Hide resolved
@sachinsachdeva
Copy link
Contributor

Hey @anakin87 ,

  • I have signed the CLA (actually a few times already ) , but the status is not getting reflected for some reason, are you aware of how to trouble shoot that ?
  • @AlistairLR112 has done great work so far and we should be able to wrap this up soon 💪
  • As for the scope wanted to bring up potential support for streaming response and auto download Ollama model if its not available on the machine, I would suggest to complete this PR without the 2 additional features and do them separately (assuming they are voted in 😏 )

@AlistairLR112
Copy link
Contributor Author

Hey @anakin87 ,

* I have  signed  the CLA (actually a few times already ) , but the status is not getting reflected for some  reason, are you aware of how to trouble shoot that ?

* @AlistairLR112 has done great work so far and we should be able to wrap this up soon  💪

* As for the scope wanted to bring up potential support for **streaming response** and **auto download Ollama model** if its not available on the machine, I would suggest to complete this PR without the 2 additional features and do them separately (assuming they are voted in  😏 )

Thanks @sachinsachdeva!

I agree with you about adding streaming later!

@anakin87
Copy link
Member

anakin87 commented Jan 2, 2024

@AlistairLR112 I finally managed to run Ollama for tests, taking a cue from your suggestion!
Tomorrow I will look deeply at this PR, which already seems to be in a good state...

Copy link
Member

@anakin87 anakin87 left a comment

Choose a reason for hiding this comment

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

@AlistairLR112 I left some comments about aspects that can be improved.
Please let me know if you can address them...

I will also push some minor changes to this PR

  • testing workflow: I will probably change something on how we spin up the Ollama service and then update the README accordingly
  • add this integration to the inventory in the general README of core integrations

integrations/ollama/src/ollama_haystack/generator.py Outdated Show resolved Hide resolved
integrations/ollama/src/ollama_haystack/generator.py Outdated Show resolved Hide resolved
integrations/ollama/src/ollama_haystack/generator.py Outdated Show resolved Hide resolved
integrations/ollama/tests/test_generator.py Outdated Show resolved Hide resolved
integrations/ollama/tests/test_generator.py Show resolved Hide resolved
@AlistairLR112
Copy link
Contributor Author

Apologies, forgot to modify a test there..

@anakin87
Copy link
Member

anakin87 commented Jan 3, 2024

@AlistairLR112 I intend to make some final refinements to docstring and other small things,
then I will merge your PR.
Thanks again!

@AlistairLR112
Copy link
Contributor Author

@AlistairLR112 I intend to make some final refinements to docstring and other small things, then I will merge your PR. Thanks again!

I suspect some of the changes will be getting rid of my silly test cases!

Do let me know when it's all done, would like to make a post about it on linkedin if you are okay with that!

@anakin87
Copy link
Member

anakin87 commented Jan 3, 2024

I will try to merge this PR today...
Before announcing this new feature on social media, I would wait until all the steps on #146 are done (including examples and docs) so that people can start immediately using it. Once this first (big) step is merged, we can collaborate/coordinate on the other steps to speed things up.

Of course, the contribution is yours, so you can also announce it in advance if you prefer.
(BTW, it is a pleasure to collaborate with you)

@AlistairLR112
Copy link
Contributor Author

I will try to merge this PR today... Before announcing this new feature on social media, I would wait until all the steps on #146 are done (including examples and docs) so that people can start immediately using it. Once this first (big) step is merged, we can collaborate/coordinate on the other steps to speed things up.

Of course, the contribution is yours, so you can also announce it in advance if you prefer. (BTW, it is a pleasure to collaborate with you)

Hey @anakin87, I will wait until everything is done, let me know where I can help. Has been fantastic to collab with you too! Happy to add more integrations :)

@anakin87 anakin87 self-requested a review January 3, 2024 17:41
Copy link
Member

@anakin87 anakin87 left a comment

Choose a reason for hiding this comment

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

This first implementation is good to go!

Merging...

@anakin87 anakin87 merged commit b80138e into deepset-ai:main Jan 3, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants