This project is built using IBM Watson machine learning.
To get a local copy up and running follow these simple example steps.
- Python 3.11 or newer
- Git and pip installed
- BAM account
- BAM_API_KEY
- BAM_URL
Below is an example of how you can instruct your audience on installing and setting up your app. This template doesn't rely on any external dependencies or services.
- Get a BAM API Key at https://bam.res.ibm.com
- BAM URL: https://bam.res.ibm.com
- Clone the repo
git clone <project gti>
- Install python packages
pip install -r requirements.txt
- Create a new file
.env
from thedefault.env
example and enter your BAM_API_KEY in the top line
in order to run the API service
uvicorn app.main:app --reload --port 8080
To send a request to the server you can use the following curl command:
curl -X 'POST' 'http://127.0.0.1:8080/ols' -H2 'accept: application/json' -H 'Content-Type: application/json' -d '{"query": "write a deployment yaml for the mongodb image"}'
There is a minimal Gradio UI you can use when running the OLS server locally. To use it, first start the OLS server per Run the server and then browse to the built in Gradio interface at http://localhost:8080/ui
By default this interface will ask the OLS server to retain and use your conversation history for subsequent interactions. To disable this behavior, expand the Additional Inputs
configuration at the bottom of the page and uncheck the Use history
checkbox. When not using history each message you submit to OLS will be treated independently with no context of previous interactions.
A Helm chart is available for installing the service in OpenShift.
Before installing the chart, you must configure the auth.key
parameter in the Values file
To install the chart with the release name ols-release
in the namespace openshift-lightspeed
:
helm upgrade --install ols-release helm/ --create-namespace --namespace openshift-lightspeed
The command deploys the service in the default configuration.
The default configuration contains OLS fronting with a kube-rbac-proxy.
To uninstall/delete the chart with the release name ols-release
:
helm delete ols-release --namespace openshift-lightspeed
Chart customization is available using the Values file.
- [ ]
See the open issues for a full list of proposed features (and known issues).
See contributors guide.
Published under the Apache 2.0 License