Skip to content

Commit

Permalink
👻 Update dependencies, update default model, update documentation (#357)
Browse files Browse the repository at this point in the history
* Updated default model to IBM-served Llama 3

Signed-off-by: JonahSussman <[email protected]>

* Tweaked more demo stuff

Signed-off-by: JonahSussman <[email protected]>

* Updated dependencies

Signed-off-by: JonahSussman <[email protected]>

* Filtered more headers from VCR cassettes

Signed-off-by: JonahSussman <[email protected]>

---------

Signed-off-by: JonahSussman <[email protected]>
  • Loading branch information
JonahSussman authored Sep 10, 2024
1 parent 094469b commit 37a7e76
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 29 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ suggestions, and apply them to your codebase.

### Launch the Kai backend with sample data

> [!IMPORTANT]
>
> Kai is in early development and is not yet ready for production use. We
> currently recommend checking out the git tag `stable` for the most stable user
> experience.
The quickest way to get running is to leverage sample data committed into the
Kai repo along with the `podman compose up` workflow

Expand Down
21 changes: 16 additions & 5 deletions docs/scenarios/demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ Konveyor AI (Kai) can assist and expedite the modernization process.
- Quarkus 3.10
- Java 17

Additionally, you will need to have the Kai IDE plugin installed in VSCode. You
can follow the steps listed
Additionally, you will need to have the Kai IDE plugin installed in VSCode. As
of 2024-09-10, you should install **version 0.0.3**. You can follow the steps
listed
[here](https://github.com/konveyor-ecosystem/kai-vscode-plugin)

## Step 1: Setup
Expand Down Expand Up @@ -305,8 +306,14 @@ distribution. For the sake of simplicity we choose
> It is assumed that minikube is installed. If not you can follow
> the instructions [here](https://minikube.sigs.k8s.io/docs/start/).
Point your shell to minikube's docker daemon. Kubernetes may not be able to find
the built images if they are not in the same docker daemon as minikube.
First, start minikube with the docker driver:

```bash
minikube start --driver=docker
```

Next, point your shell to minikube's docker daemon. Kubernetes may not be able
to find the built images if they are not in the same docker daemon as minikube.

```bash
eval $(minikube docker-env)
Expand All @@ -320,6 +327,9 @@ kubectl apply -f deploy/kubernetes/persistent-volume.yaml
kubectl apply -f deploy/kubernetes/persistent-volume-claim.yaml
kubectl apply -f deploy/kubernetes/postgresql-deployment.yaml
kubectl apply -f deploy/kubernetes/postgresql-service.yaml

# Wait until the postgres pod is running
watch kubectl get all
```

This should setup the database ready for connections from the coolstore app.
Expand All @@ -332,7 +342,8 @@ image.
mvn clean compile package -Dquarkus.kubernetes.deploy=true
```

Once deployed, access the app via browser hitting the localhost and port. To get
Once deployed, access the app via browser hitting the localhost and port. Note
that it might take a minute when you open the website for the first time. To get
this URL, run the following command:

```bash
Expand Down
3 changes: 2 additions & 1 deletion kai/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ password = "dog8code"
provider = "ChatIBMGenAI"

[models.args]
model_id = "mistralai/mixtral-8x7b-instruct-v01"
model_id = "meta-llama/llama-3-70b-instruct"
parameters.max_new_tokens = 2048
14 changes: 13 additions & 1 deletion kai/service/kai_application/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,19 @@ def playback_if_demo_mode(
"headers",
],
record_on_exception=False,
filter_headers=["authorization", "cookie", "content-length"],
filter_headers=[
"authorization",
"cookie",
"content-length",
"x-stainless-lang",
"x-stainless-async",
"x-stainless-runtime",
"x-stainless-arch",
"x-stainless-os",
"x-stainless-package-version",
"x-stainless-runtime-version",
"user-agent",
],
)
KAI_LOG.debug(
f"record_mode='{record_mode}' - Using cassette {application_name}/{model_id}/{filename}.yaml",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies = [
"Jinja2==3.1.4",
"langchain==0.2.11",
"langchain-community==0.2.10",
"langchain-openai==0.1.17",
"langchain-openai==0.1.23",
"langchain-google-genai==1.0.9",
"langchain-experimental==0.0.64",
"gunicorn==22.0.0",
Expand Down
40 changes: 19 additions & 21 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ botocore==1.34.162
# s3transfer
cachetools==5.5.0
# via google-auth
certifi==2024.7.4
certifi==2024.8.30
# via
# httpcore
# httpx
# requests
cffi==1.17.0
cffi==1.17.1
# via argon2-cffi-bindings
charset-normalizer==3.3.2
# via requests
Expand All @@ -86,9 +86,9 @@ distro==1.9.0
# via openai
execnb==0.1.6
# via nbdev
executing==2.0.1
executing==2.1.0
# via stack-data
fastcore==1.7.1
fastcore==1.7.5
# via
# execnb
# ghapi
Expand All @@ -101,7 +101,7 @@ frozenlist==1.4.1
# via
# aiohttp
# aiosignal
ghapi==1.0.5
ghapi==1.0.6
# via nbdev
gitdb==4.0.11
# via gitpython
Expand All @@ -114,7 +114,7 @@ google-api-core[grpc]==2.19.2
# google-ai-generativelanguage
# google-api-python-client
# google-generativeai
google-api-python-client==2.143.0
google-api-python-client==2.145.0
# via google-generativeai
google-auth==2.34.0
# via
Expand All @@ -131,7 +131,7 @@ googleapis-common-protos==1.65.0
# via
# google-api-core
# grpcio-status
greenlet==3.0.3
greenlet==3.1.0
# via sqlalchemy
grpcio==1.66.1
# via
Expand Down Expand Up @@ -173,7 +173,7 @@ ipykernel==6.29.5
# jupyter-console
# jupyterlab
# qtconsole
ipython==8.26.0
ipython==8.27.0
# via
# execnb
# ipykernel
Expand Down Expand Up @@ -270,7 +270,7 @@ langchain-community==0.2.10
# via
# kai (pyproject.toml)
# langchain-experimental
langchain-core==0.2.36
langchain-core==0.2.39
# via
# langchain
# langchain-community
Expand All @@ -282,11 +282,11 @@ langchain-experimental==0.0.64
# via kai (pyproject.toml)
langchain-google-genai==1.0.9
# via kai (pyproject.toml)
langchain-openai==0.1.17
langchain-openai==0.1.23
# via kai (pyproject.toml)
langchain-text-splitters==0.2.2
langchain-text-splitters==0.2.4
# via langchain
langsmith==0.1.107
langsmith==0.1.117
# via
# langchain
# langchain-community
Expand All @@ -305,7 +305,7 @@ matplotlib-inline==0.1.7
# ipython
mistune==3.0.2
# via nbconvert
multidict==6.0.5
multidict==6.1.0
# via
# aiohttp
# yarl
Expand Down Expand Up @@ -336,7 +336,7 @@ numpy==1.26.4
# via
# langchain
# langchain-community
openai==1.43.0
openai==1.44.1
# via langchain-openai
orjson==3.10.7
# via langsmith
Expand All @@ -362,7 +362,7 @@ parso==0.8.4
# via jedi
pexpect==4.9.0
# via ipython
platformdirs==4.2.2
platformdirs==4.3.2
# via jupyter-core
prometheus-client==0.20.0
# via jupyter-server
Expand Down Expand Up @@ -564,7 +564,7 @@ tree-sitter-java==0.21.0
# via kai (pyproject.toml)
typer==0.9.0
# via kai (pyproject.toml)
types-python-dateutil==2.9.0.20240821
types-python-dateutil==2.9.0.20240906
# via arrow
typing-extensions==4.12.2
# via
Expand All @@ -591,7 +591,7 @@ urllib3==2.2.2
# vcrpy
vcrpy @ git+https://github.com/fabianvf/vcrpy.git@httpx-async-threadpool
# via kai (pyproject.toml)
watchdog==5.0.0
watchdog==5.0.2
# via nbdev
wcwidth==0.2.13
# via prompt-toolkit
Expand All @@ -609,13 +609,11 @@ widgetsnbextension==4.0.13
# via ipywidgets
wrapt==1.16.0
# via vcrpy
yarl==1.9.4
yarl==1.11.1
# via
# aiohttp
# vcrpy

# The following packages are considered to be unsafe in a requirements file:
pip==24.2
# via ghapi
setuptools==74.0.0
setuptools==74.1.2
# via jupyterlab

0 comments on commit 37a7e76

Please sign in to comment.