This repository contains example scripts and notebooks demonstrating how to use Oracle Cloud Infrastructure (OCI) Generative AI with Cohere for chat applications.
oci_genai_cohere_chat_example.ipynb
: Jupyter notebook example for OCI GenAI Cohere chatoci_genai_cohere_chat_example.py
: Python script version of the chat exampleoci_genai_cohere_chat_streaming_example.ipynb
: Jupyter notebook example for OCI GenAI Cohere chat with streamingoci_genai_cohere_chat_streaming_example.py
: Python script version of the streaming chat example
To run these examples, you'll need:
- Python 3.x
- Required Python packages (listed in
requirements.txt
)
-
Clone this repository:
git clone https://github.com/kutsushitaneko/oci-genai-cohere-chat-examples.git cd oci-genai-cohere-chat-examples
-
Install the required packages:
pip install -r requirements.txt
-
Set up your environment variables:
- Copy
.env_sample
to.env
- Fill in your OCI credentials and configuration in the
.env
file
- Copy
-
Start Jupyter Notebook:
jupyter notebook
-
Open either
oci_genai_cohere_chat_example.ipynb
oroci_genai_cohere_chat_streaming_example.ipynb
-
Run the cells in the notebook to see the chat examples in action
Run either of the Python scripts directly:
python oci_genai_cohere_chat_example.py
or
python oci_genai_cohere_chat_streaming_example.py
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT No Attribution License (MIT-0). This license allows you to use, copy, modify, and distribute the software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software.
The full text of the license can be found here: https://opensource.org/licenses/MIT-0
For any questions or issues, please open an issue in this repository.