How to search the marketplace
This guide will walk you through the process of searching the marketplace for various aiXplain assets, including agents, models, pipelines, metrics, and data.
- Models
- Pipelines
- Agents
- Metrics
- Data
Models
aiXplain's collection of models is available on Studio in the Discover marketplace or through the SDK. The models are searchable using queries, filters and Bel Esprit (only on Studio), and directly accessible using thier IDs (unique identifiers).
Models are searchable on the SDK using the following search parameters:
- Python
- Swift
query
(Search bar in UI): The name of the model.version
(Search bar in UI): The version of the model.function
: The AI function performed by the model.source_languages
(Input language): The model's default input language.target_languages
(Output language): The model's default output language.ownership
(Owner): The Team/User that owns the model asset.is_finetunable
(FineTune compatible): The model can be finetuned.suppliers
: The supplier that is hosting the model.
query
(Search bar in UI): The name of the model.functions
: The AI function performed by the model.
- Python
- Swift
Let's use query
, function
, source_languages
, target_languages
and suppliers
to search for translation models from English to Canadian French.
from aixplain.factories import ModelFactory
from aixplain.enums import Function, Language, Supplier
model_list = ModelFactory.list(
"Canada",
function=Function.TRANSLATION,
source_languages=Language.English,
target_languages=Language.French,
suppliers=[Supplier.AWS, Supplier.GOOGLE, Supplier.MICROSOFT],
)["results"]
for model in model_list:
print(model.__dict__)
Use the _member_names_
attribute to see the list of available function types, languages and suppliers.
Function._member_names_
Language._member_names_
Supplier._member_names_
Let's use query
and function
to search for translation models from English to Canadian French.
let provider = ModelProvider()
Task {
let query = ModelQuery(query: "English to French Canada", functions: ["translation"])
let result = try? await provider.list(query)
result?.forEach { model in
dump(model)
}
}
The best way to view a list of all available functions is to check Discover. We will add a programmatic way to get this information to Swift in future. We will also soon display all models (and functions) in the Docs. 👍
Direct Access
Once you know a model's ID, you can access the model directly (without searching for it).
EXAMPLE
OpenAI's GPT-4 model has ID 6414bd3cd09663e9225130e8
.
Instantiate a model object
- Python
- Swift
from aixplain.factories import ModelFactory
model = ModelFactory.get('6414bd3cd09663e9225130e8')
model.__dict__
import AiXplainKit
let model = ModelProvider().get("6414bd3cd09663e9225130e8")
dump(model)
Once you have identified a suitable model, you can use it for inference, benchmarking, finetuning, or integrating it into custom AI pipelines.
Pipelines
You can find your pipelines your Studio Dashboard, the Discover marketplace, or through the SDK. Pipelines are searchable using queries, filters, and are directly accessible using their IDs (unique identifiers).
Search is not yet implemented on the Swift SDK. Instead find your pipeline ID on Studio.
Pipelines are searchable on the SDK using the following search parameters:
- Python
query
(Search bar in UI): The name of a pipeline.function
: The AI function performed by a model in the pipeline.ownership
(Owner): The Team/User that owns the pipeline asset - always you as currently all pipelines are private.input_data_types
(Input modality): The pipeline's main input modalities. (Text, Audio, Image, Video.)output_data_types
(Output modality): The pipeline's main output modalities. (Text, Audio, Image, Video.)models
: The models that the pipeline contains.
All parameters except query
can be passed as single items or lists.
Let's use models
to search for pipelines containing GPT-4
(hosted by OpenAI).
- Python
from aixplain.factories import ModelFactory
from aixplain.enums import Function, Language
model_list = ModelFactory.list("gpt 4")["results"]
for model in model_list:
print(model.__dict__)
gpt4 = ModelFactory.get('6414bd3cd09663e9225130e8')
from aixplain.factories import PipelineFactory
pipeline_list = PipelineFactory.list(
models=[model],
)["results"]
for pipeline in pipeline_list:
print(pipeline.__dict__)
Use the _member_names_
attribute to see a list of available function types and data types.
Function._member_names_
DataType._member_names_
Direct Access
Once you know a pipeline's unique ID, you can access the pipeline directly (without searching for it).
To access a pipeline, you must first create one. (The pipeline below is Private
, so running the code would result in an error.) Read our How to build a pipeline guide for the SDK or watch our Design Overview video to learn how to build your first pipeline (Translation & Speech Synthesis) on Studio.
EXAMPLE
The AnalyticsLLM pipeline has ID 65a5a7039ab6f53e04e45abe
.
Instantiate a pipeline object
- Python
- Swift
from aixplain.factories import PipelineFactory
pipeline = PipelineFactory.get('65a5a7039ab6f53e04e45abe')
pipeline.__dict__
import AiXplainKit
let pipeline = PipelineProvider().get('65a5a7039ab6f53e04e45abe')
Replace the ID above with an ID for your own Pipeline. Using the AnalyticsLLM ID will give you an error. 👇
Private pipelines can only be accessed using an API Key for the Team that owns them. To share a pipeline with other Teams, you can save it as a JSON file that they can upload to their Teams on the Platform.
Once you have found your pipeline, you can use it for inference.
Agents
You can find your Agents through the SDK and access them directly using their IDs (unique identifiers).
- Python
from aixplain.factories import AgentFactory
agent_list = AgentFactory.list()["results"]
for agent in agent_list:
print(agent.__dict__)
Direct Access
Once you know an agent's unique ID, you can access the agent directly (without searching for it).
EXAMPLE
Our Text Aalysis Agent has ID 66a93909eb87c404212a0f2b
.
Instantiate an Agent object
- Python
from aixplain.factories import AgentFactory
agent = AgentFactory.get("66a93909eb87c404212a0f2b")
agent.__dict__
Replace the ID above with an ID for your own agent. Using the Text Analyser Agent ID will give you an error. 👇
Private agents can only be accessed using an API Key for the Team that owns them.
Once you have found your agent, you can use it for inference.
Metrics
Metrics are searchable on the SDK using the following search parameters:
hypothesis
(Hypothesis): The metric's hypothesis modality. (Text, Audio, Image, Video, Label, Number.)is_source_required
(Source required): Should the metric use source. Defaults to None.is_reference_required
(Reference required):Should the metric use reference. Defaults to None.model_id
: ID of model for which metric is to be used. Defaults to None.
All parameters except query
can be passed as single items or lists.
View all available metrics by specifying no filters.
- Python
from aixplain.factories import MetricFactory
metric_list = MetricFactory.list(page_size=50)["results"]
for metric in metric_list:
print(metric.__dict__)
Let's search for all metrics compatible with GPT-4
that require a reference input.
- Python
metric_list = MetricFactory.list(
model_id=model.id,
is_reference_required=True,
)["results"]
for metric in metric_list:
print(metric.__dict__)
Direct Access
Once you know a metric's ID, you can access the metric directly (without searching for it).
EXAMPLE
BLEU has ID 639874ab506c987b1ae1acc6
.
Instantiate a metric object
- Python
from aixplain.factories import MetricFactory
bleu = MetricFactory.get('639874ab506c987b1ae1acc6')
bleu.__dict__
Once you have found your metric, you can use it for inference, finetuning and benchmarking.
Data
Data assets are searchable using queries and filters and directly accessible using their IDs (unique identifiers).
You cannot download the contents of a Dataset or Corpus.
Corpora
- Python
from aixplain.factories import CorpusFactory
corpus_list = CorpusFactory.list(
# query="",
# function=Function.TRANSLATION,
# language=[Language.English],
# data_type=DataType.TEXT,
# page_size=5
)["results"]
for corpus in corpus_list:
print(corpus.__dict__)
corpus = CorpusFactory.get("<CORPUS_ID>")
Datasets
- Python
from aixplain.factories import DatasetFactory
dataset_list = DatasetFactory.list(
# query="",
# function=Function.TRANSLATION,
# source_languages=[Language.English],
# target_languages=[Language.Spanish],
# data_type=DataType.TEXT,
# page_size=5
)["results"]
for dataset in dataset_list:
print(dataset.__dict__)
dataset = DatasetFactory.get("<DATASET_ID>")
Next, create or integrate these assets into AI agents to enhance your applications.