Skip to content

Reference

Bases: BaseModel

An LLM represents an OpenAI-compatible LLM endpoint.

No validation takes place when creating or updating LLM objects in the database. The first time the server attempts a connection is when a query is performed.

Attributes:

Name Type Description
name str

The identifier for the LLM object.

endpoint str

OpenAI-compatible endpoint.

api_key str | None

Secret API Key to connect to the LLM endpoint.

__call__(**params)

Return a LangChain Chat instance.

openai_chat_model(**params)

Return a LangChain OpenAI chat model.

Bases: BaseModel

An Embedding Provider represents a model the server supports.

Bases: BaseModel

An Embedding Model is a particular instantiation of an Embedding Provider with specific parameters.

__call__()

Return the associated LangChain Embedding instance.

Bases: BaseModel

An Text Splitter represents a provider the server supports.

__call__()

Return the associated LangChain Embedding instance.

Bases: BaseModel

A Pipeline contains all the logic and configuration on how to process RAG requests.

embedding_model()

Associated Embedding Model.

Bases: BaseModel

Class representing a document to be processed by a Pipeline.

Bases: BaseModel

An Agent represents a set of instructions with an associated pipeline and LLM.

Bases: BaseStore, VectorStore

Foundation4ai Vector Store.

from_texts(texts, embedding, embedding_length, metadatas=None, *, db, table, distance_strategy=DistanceStrategy.COSINE, ids=None, **kwargs) classmethod

Return VectorStore initialized from texts and embeddings.

Parameters:

Name Type Description Default
texts list[str]

Texts to add to the vectorstore.

required
embedding Embeddings

Embedding function to use.

required
embedding_length int

Embedding length

required
metadatas Optional[List[dict]]

Optional list of metadatas associated with the texts. Default is None.

None
ids Optional[List[str]]

Optional list of IDs associated with the texts.

None
db Connection

database connection,

required
table str

table name to save the vectors,

required
distance_strategy DistanceStrategy

distance strategy for retrievals,

COSINE
kwargs Any

Additional keyword arguments.

{}

Returns:

Name Type Description
VectorStore VST

VectorStore initialized from texts and embeddings.

Bases: BaseModel

Classification search parameters.

Bases: IntFlag

Type of classifications search.

EXACT = 1 class-attribute instance-attribute

Causes the search to fail if any classification passed in doesn't exist in the pipeline.

HIERARCHICAL = 2 class-attribute instance-attribute

Search is hierarchical

OpenAI Support

Chat model.