vision_agent.sim
vision_agent.sim.AzureSim
AzureSim(
df,
sim_key=None,
api_key=None,
api_version="2024-02-01",
azure_endpoint=None,
model=None,
)
Bases: Sim
Source code in vision_agent/sim/sim.py
save
Source code in vision_agent/sim/sim.py
load
staticmethod
Source code in vision_agent/sim/sim.py
check_load
staticmethod
Source code in vision_agent/sim/sim.py
top_k
cached
Returns the top k most similar items to the query.
PARAMETER | DESCRIPTION |
---|---|
query |
str: The query to compare to.
TYPE:
|
k |
int: The number of items to return.
TYPE:
|
thresh |
Optional[float]: The minimum similarity threshold.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Sequence[Dict]
|
Sequence[Dict]: The top k most similar items. |
Source code in vision_agent/sim/sim.py
vision_agent.sim.OllamaSim
Bases: Sim
Source code in vision_agent/sim/sim.py
save
Source code in vision_agent/sim/sim.py
load
staticmethod
Source code in vision_agent/sim/sim.py
check_load
staticmethod
Source code in vision_agent/sim/sim.py
top_k
cached
Returns the top k most similar items to the query.
PARAMETER | DESCRIPTION |
---|---|
query |
str: The query to compare to.
TYPE:
|
k |
int: The number of items to return.
TYPE:
|
thresh |
Optional[float]: The minimum similarity threshold.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Sequence[Dict]
|
Sequence[Dict]: The top k most similar items. |
Source code in vision_agent/sim/sim.py
vision_agent.sim.Sim
Creates a similarity object that can be used to find similar items in a dataframe.
PARAMETER | DESCRIPTION |
---|---|
df |
pd.DataFrame: The dataframe to use for similarity.
TYPE:
|
sim_key |
Optional[str]: The column name that you want to use to construct the embeddings.
TYPE:
|
api_key |
Optional[str]: The OpenAI API key to use for embeddings.
TYPE:
|
model |
str: The model to use for embeddingshttps://github.com/landing-ai/vision-agent/pull/280.
TYPE:
|
Source code in vision_agent/sim/sim.py
save
Source code in vision_agent/sim/sim.py
load
staticmethod
Source code in vision_agent/sim/sim.py
check_load
staticmethod
Source code in vision_agent/sim/sim.py
top_k
cached
Returns the top k most similar items to the query.
PARAMETER | DESCRIPTION |
---|---|
query |
str: The query to compare to.
TYPE:
|
k |
int: The number of items to return.
TYPE:
|
thresh |
Optional[float]: The minimum similarity threshold.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Sequence[Dict]
|
Sequence[Dict]: The top k most similar items. |
Source code in vision_agent/sim/sim.py
vision_agent.sim.StellaSim
Bases: Sim
Source code in vision_agent/sim/sim.py
save
Source code in vision_agent/sim/sim.py
check_load
staticmethod
Source code in vision_agent/sim/sim.py
top_k
cached
Returns the top k most similar items to the query.
PARAMETER | DESCRIPTION |
---|---|
query |
str: The query to compare to.
TYPE:
|
k |
int: The number of items to return.
TYPE:
|
thresh |
Optional[float]: The minimum similarity threshold.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Sequence[Dict]
|
Sequence[Dict]: The top k most similar items. |