Skip to content
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
35 changes: 0 additions & 35 deletions ai/generative-ai-service/oci_langflow/LICENSE

This file was deleted.

60 changes: 60 additions & 0 deletions ai/generative-ai-service/oci_langflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,66 @@ This repository contains the code for a prototype of the integration of OCI Gene

Reviewed: 25.06.2025

## Components for Retrieval-Augmented Generation (RAG)
In this release (jan 2025), we have included the essential components required to build a robust Retrieval-Augmented Generation (RAG) solution:

1. OCI Embeddings Model
Based on Cohere, this component generates embeddings for your data, enabling effective search and retrieval.

2. OCI Chat Model
Powered by Meta or Cohere models, this component handles conversational AI tasks for natural and engaging user interactions.

3. OCI Vector Store
Built on Oracle Database 23AI, this component provides a highly efficient and scalable vector store for managing and querying embeddings.

## Langflow setup
To setup an environment with Langflow this is the recommended sequence of steps:

1. Create and activate a "conda environment" using Python 3.11
```
conda create -n oci_langflow python==3.11
conda activate oci_langflow
```
2. Install the tool [uv](https://docs.astral.sh/uv/getting-started/) in this environment, using pip
3. Install Langflow using uv. Follow the instructions [here](https://docs.langflow.org/get-started-installation)
```
uv pip install langflow
```
4. Install oci Python sdk and update langchain-community
```
pip install oci -U
```

## Setup your environment for OCI
* Clone the github repository
```
git clone https://github.com/luigisaetta/oci_langflow.git
```
* modify the `set_env.sh` file. Change the env variable `LANGFLOW_COMPONENTS_PATH` to point your local **oci_custom** directory
* execute the following command to set the environment variables:
```
source ./set_env.sh
```
* start langflow using the command:
```
uv run langflow run
```

## Notes
### Setup: do not install Langflow using directly pip, use uv.
There are many components and pip really struggle to manage them correctly.
As a result the installation is really slow.
The preferred way to do (as suggested also in the official documentation) is to use
uv.

### The **Philosophy**
The main idea is to provide the code as an easy way that can be used from people.
Then, if they want, they can add all the details they really need.
Therefore, for example, wrappers expose only the mandatory parameters that needs to be customized.
For the remaining:
1. I have followed Langchain defaults.
2. The code is simple and easy to be customized.

## Security
Please consult the [security guide](./SECURITY.md) for our responsible security
vulnerability disclosure process.
Expand Down