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
242 changes: 242 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,4 @@ aws-sdk-sqs = "1.67.0"
numpy = "0.25.0"
infer = "0.19.0"
serde_with = { version = "3.13.0", features = ["base64"] }
google-cloud-aiplatform-v1 = "0.4.0"
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Ultra performant data transformation framework for AI, with core engine written

</br>

CocoIndex makes it super easy to transform data with AI workloads, and keep source data and target in sync effortlessly.
CocoIndex makes it super easy to transform data with AI workloads, and keep source data and target in sync effortlessly.

</br>

Expand All @@ -39,7 +39,7 @@ CocoIndex makes it super easy to transform data with AI workloads, and keep sour

</br>

Either creating embedding, building knowledge graphs, or any data transformations - beyond traditional SQL.
Either creating embedding, building knowledge graphs, or any data transformations - beyond traditional SQL.

## Exceptional velocity
Just declare transformation in dataflow with ~100 lines of python
Expand All @@ -65,7 +65,7 @@ CocoIndex follows the idea of [Dataflow](https://en.wikipedia.org/wiki/Dataflow_
**Particularly**, developers don't explicitly mutate data by creating, updating and deleting. They just need to define transformation/formula for a set of source data.

## Build like LEGO
Native builtins for different source, targets and transformations. Standardize interface, make it 1-line code switch between different components.
Native builtins for different source, targets and transformations. Standardize interface, make it 1-line code switch between different components.

<p align="center">
<img src="https://cocoindex.io/images/components.svg" alt="CocoIndex Features">
Expand Down
1 change: 1 addition & 0 deletions python/cocoindex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
# Submodules
"_engine",
"functions",
"llm",
"sources",
"targets",
"storages",
Expand Down
1 change: 1 addition & 0 deletions python/cocoindex/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class EmbedText(op.FunctionSpec):
address: str | None = None
output_dimension: int | None = None
task_type: str | None = None
api_config: llm.VertexAiConfig | None = None


class ExtractByLlm(op.FunctionSpec):
Expand Down
12 changes: 12 additions & 0 deletions python/cocoindex/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,29 @@ class LlmApiType(Enum):
OPENAI = "OpenAi"
OLLAMA = "Ollama"
GEMINI = "Gemini"
VERTEX_AI = "VertexAi"
ANTHROPIC = "Anthropic"
LITE_LLM = "LiteLlm"
OPEN_ROUTER = "OpenRouter"
VOYAGE = "Voyage"
VLLM = "Vllm"


@dataclass
class VertexAiConfig:
"""A specification for a Vertex AI LLM."""

kind = "VertexAi"

project: str
region: str | None = None


@dataclass
class LlmSpec:
"""A specification for a LLM."""

api_type: LlmApiType
model: str
address: str | None = None
api_config: VertexAiConfig | None = None
Loading
Loading