diff --git a/ai/generative-ai-service/oci_langflow/LICENSE b/ai/generative-ai-service/oci_langflow/LICENSE deleted file mode 100644 index 62c949c4e..000000000 --- a/ai/generative-ai-service/oci_langflow/LICENSE +++ /dev/null @@ -1,35 +0,0 @@ -Copyright (c) 2024 Oracle and/or its affiliates. - -The Universal Permissive License (UPL), Version 1.0 - -Subject to the condition set forth below, permission is hereby granted to any -person obtaining a copy of this software, associated documentation and/or data -(collectively the "Software"), free of charge and under any and all copyright -rights in the Software, and any and all patent rights owned or freely -licensable by each licensor hereunder covering either (i) the unmodified -Software as contributed to or provided by such licensor, or (ii) the Larger -Works (as defined below), to deal in both - -(a) the Software, and -(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if -one is included with the Software (each a "Larger Work" to which the Software -is contributed by such licensors), - -without restriction, including without limitation the rights to copy, create -derivative works of, display, perform, and distribute the Software and make, -use, sell, offer for sale, import, export, have made, and have sold the -Software and the Larger Work(s), and to sublicense the foregoing rights on -either these or other terms. - -This license is subject to the following condition: -The above copyright notice and either this complete permission notice or at -a minimum a reference to the UPL must be included in all copies or -substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/ai/generative-ai-service/oci_langflow/README.md b/ai/generative-ai-service/oci_langflow/README.md index 3f134fb7c..a2b34502b 100644 --- a/ai/generative-ai-service/oci_langflow/README.md +++ b/ai/generative-ai-service/oci_langflow/README.md @@ -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.