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

Resolve snyk warnings and expand model options #204

Merged
merged 8 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!--
A new scriv changelog fragment.

Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Highlights ✨

- A bullet item for the Highlights ✨ category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Removed

- A bullet item for the Removed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Added

- A bullet item for the Added category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Changed

- A bullet item for the Changed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Deprecated

- A bullet item for the Deprecated category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Fixed

- A bullet item for the Fixed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->

### Security

- Bump langchain version to 0.0.329, suggested by snyk ([#204](https://github.com/mckinsey/vizro/pull/204))
10 changes: 5 additions & 5 deletions vizro-ai/docs/pages/user_guides/model_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ Vizro-AI currently supports the following LLMs:

### OpenAI models

- gpt-3.5-turbo-0613
- gpt-3.5-turbo-0613 (to be deprecated on June 13, 2024)
- gpt-4-0613
- gpt-3.5-turbo-1106 (under testing)
- gpt-4-1106-preview (under testing, not suitable for production use)

These models provide different levels of performance and
cost. In general, `gpt-3.5-turbo-0613` is the most cost-effective model, which would be a good
starting point for most users. `gpt-4-0613` is more powerful than the other, like
it allows for more tokens per request.
You can refer to these models' [capabilities](https://platform.openai.com/docs/models/overview)
cost. In general, the `gpt-3.5-turbo` collection provides the most cost-effective models,
which would be a good starting point for most users. `gpt-4` models are more powerful than `gpt-3` models, e.g. they allow for more tokens per request. You can refer to these models' [capabilities](https://platform.openai.com/docs/models/overview)
and [pricing](https://openai.com/pricing) for more information.

We are working on supporting more models and more vendors. Please stay tuned!
2 changes: 1 addition & 1 deletion vizro-ai/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies = [
"pandas",
"tabulate",
"openai>=0.27.8,<1.0.0", # TODO add support for openai>=1.0.0
"langchain==0.0.325",
"langchain==0.0.329",
lingyielia marked this conversation as resolved.
Show resolved Hide resolved
"python-dotenv>=1.0.0", # TODO decide env var management to see if we need this
"vizro>=0.1.4", # TODO set upper bound later
"ipython>=8.10.0", # not directly required, pinned by Snyk to avoid a vulnerability: https://app.snyk.io/vuln/SNYK-PYTHON-IPYTHON-3318382
Expand Down
2 changes: 1 addition & 1 deletion vizro-ai/snyk/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pandas
tabulate
openai>=0.27.8,<1.0.0
langchain==0.0.325
langchain==0.0.329
python-dotenv>=1.0.0
vizro>=0.1.4
ipython>=8.10.0
Expand Down
10 changes: 10 additions & 0 deletions vizro-ai/src/vizro_ai/chains/_llm_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@
"max_tokens": 8192,
"wrapper": ChatOpenAI,
},
{
"name": "gpt-3.5-turbo-1106",
"max_tokens": 16385,
"wrapper": ChatOpenAI,
},
{
"name": "gpt-4-1106-preview",
"max_tokens": 128000,
"wrapper": ChatOpenAI,
},
]


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!--
A new scriv changelog fragment.

Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Highlights ✨

- A bullet item for the Highlights ✨ category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Removed

- A bullet item for the Removed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Added

- A bullet item for the Added category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Changed

- A bullet item for the Changed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Deprecated

- A bullet item for the Deprecated category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Fixed

- A bullet item for the Fixed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
<!--
### Security

- A bullet item for the Security category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))

-->
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
companies:
type: pandas.JSONDataSet
type: pandas.JSONDataset
filepath: companies.json

reviews:
type: pickle.PickleDataSet
type: pickle.PickleDataset
filepath: reviews.pkl
Loading