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

add local llm support with ollama #157

Merged
merged 26 commits into from
Mar 25, 2024
Merged

Conversation

leilabb
Copy link
Contributor

@leilabb leilabb commented Mar 14, 2024

Left to do:

  • --STARTED-- Zod validation: at least one API (ollama url or open AI) needs to be filled in app/settings/teams AND app/settings/teams/new
  • URL Validation - verify that user inputs an actual URL in the fields on app/settings/teams AND app/settings/teams/new

leilabb and others added 15 commits January 12, 2024 14:20
* add key perk to landing page

* fix spelling
* modify copy when creating a new team

* add missing env to gh action/workflow

---------

Co-authored-by: Toni Oriol <[email protected]>
* Change 'fork' to 'clone' and change icon

* Change copy of modal after clicking 'Clone'

* replace fork with clone
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.3.9 to 4.5.2.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v4.5.2/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.5.2/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Include GitHub Actions version updates.
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v2...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](actions/setup-node@v2...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump axios, openai and postmark

Bumps [axios](https://github.com/axios/axios) to 1.6.5 and updates ancestor dependencies [axios](https://github.com/axios/axios), [openai](https://github.com/openai/openai-node) and [postmark](https://github.com/ActiveCampaign/postmark.js). These dependencies need to be updated together.


Updates `axios` from 0.25.0 to 1.6.5
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v0.25.0...v1.6.5)

Updates `openai` from 3.3.0 to 4.25.0
- [Release notes](https://github.com/openai/openai-node/releases)
- [Changelog](https://github.com/openai/openai-node/blob/master/CHANGELOG.md)
- [Commits](openai/openai-node@v3.3.0...v4.25.0)

Updates `postmark` from 3.0.19 to 4.0.2
- [Release notes](https://github.com/ActiveCampaign/postmark.js/releases)
- [Changelog](https://github.com/ActiveCampaign/postmark.js/blob/main/CHANGELOG.md)
- [Commits](ActiveCampaign/postmark.js@3.0.19...4.0.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
- dependency-name: openai
  dependency-type: direct:production
- dependency-name: postmark
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* update to openai@4 fixes

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Toni Oriol <[email protected]>
* add grouping to chats

* add last 30 days group

* add last year group

* refactor time functions

* change function name

* change func name

* add tests + new grouping function

* refactoring

* add grouping to all chats ever made

* add code fix

* change function name

* change type name

* refactor

* style code

* add tests

* catch future dates¨

* add final fixes
* add test db in compose and gh actions

* add test db setup script

* move cleanDatabase to a helper file

* rm unused test

* adjustments to make it work

* remove header param from playwright and add NODE_ENV=test in gh test action

Also adjust DATABASE_URL in env example

* install browsers with deps

* fix seeds
Copy link

render bot commented Mar 14, 2024

@leilabb leilabb marked this pull request as ready for review March 15, 2024 13:06
Copy link
Contributor

@tonioriol tonioriol left a comment

Choose a reason for hiding this comment

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

Left some suggestions and comments but other than that really good work Leila!

package.json Outdated
@@ -37,6 +37,7 @@
"@typescript-eslint/eslint-plugin": "^5.59.11",
"@typescript-eslint/parser": "^5.59.11",
"autoprefixer": "^10.4.14",
"axios": "^1.6.7",
Copy link
Contributor

Choose a reason for hiding this comment

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

No need for this in the end. So it can be removed.

message: 'Invalid OpenAI API key format',
}
),
ollamaBaseUrl: z.string(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ollamaBaseUrl: z.string(),
ollamaBaseUrl: z.string().url(),

message: "Invalid OpenAI API key format",
}),
openAiApiKey: z.string().optional(),
ollamaBaseUrl: z.string().optional(),
Copy link
Contributor

Choose a reason for hiding this comment

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

This could use the same validation rules as in the updateTeamDetails

code: z.ZodIssueCode.custom,
message: 'Please provide an API Key or Ollama Url',
})
}
})
Copy link
Contributor

Choose a reason for hiding this comment

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

And this could be used in updateTeamDetails also.

@tonioriol tonioriol merged commit 62b97c9 into dev Mar 25, 2024
1 check failed
@tonioriol tonioriol deleted the 147-support-local-llms-through-ollama branch March 25, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants