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

feat: allow to run the model locally with ollama and faiss (#17) #28

Merged
merged 26 commits into from
Apr 4, 2024

Conversation

sinedied
Copy link
Contributor

@sinedied sinedied commented Apr 4, 2024

Purpose

If no .env is provided, the app will now automatically fall back to using local models and DB.

@glaucia86 I apologize in advance for the messy PR, I also went through the whole project to refactor a bit and simplify the code as much as possible, but it seems I missed some intermediate commits when renaming files and git lost track of the renames. Because of the changes, we'll also have to update your tutorials docs. I have one further PR coming to improve the prompts then we can go through all the docs to make sure it's up to date.

Does this introduce a breaking change?

[x] Yes
[ ] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

@sinedied sinedied requested a review from glaucia86 April 4, 2024 11:50
@glaucia86 glaucia86 added enhancement New feature or request backend labels Apr 4, 2024
@@ -123,15 +124,18 @@ This will start the web app and the API locally. Open the URL `http://localhost:

First you need to provision the Azure resources needed to run the sample. Follow the instructions in the [Deploy the sample to Azure](#deploy-the-sample-to-azure) section to deploy the sample to Azure, then you'll be able to run the sample locally using the deployed Azure resources.

Once your deployment is complete, you can run the following commands to start the application locally:
Once your deployment is complete, you should see a `.env` file in the `src/api` folder. This file contains the environment variables needed to run the application using Azure resources.
Copy link
Contributor

Choose a reason for hiding this comment

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

That .env file in the folder... I'll have to change the .env.sample.
There are other variables to include in this project

Copy link
Contributor

@glaucia86 glaucia86 left a comment

Choose a reason for hiding this comment

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

Many of the things you've done I've thought about refactoring as well. I had even made an example here to test it and in fact the new v4 model allows you to do that!
Link: https://github.com/glaucia86/aoia-langchain-azurefunctions/tree/GL/applying-solid-cleanarch

Very good. Approved!

@glaucia86 glaucia86 merged commit af4e4be into main Apr 4, 2024
5 checks passed
@glaucia86 glaucia86 deleted the ollama branch April 4, 2024 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants