Applications
Create a Completion Application
Recipes
- Evaluations
- Applications
- Datasets
- Inference
Applications
Create a Completion Application
Use this recipe to create a simple completion application
Follow the instructions in the Quickstart Guide to setup the SGP Client
from scale_gp import SGPClient
client = SGPClient(api_key=api_key)
Follow the steps inside the recipe “Deploy and Execute a Model” to create a completion model deployment that we will use in our application
model_deployment = client.models.deployments.create(
model_instance_id=model_instance.id, name="Gemini-Pro Deployment", account_id=account_id
)
We will now use our gemini-pro completion model to create a simple completion application with the ApplicationBuilder helper. Once the application variant is created, it can be used for evaluations, generating report cards, and other benchmarking tasks available in the SGP SDK. The application can also be processed with an input to return a completion result.
builder = ApplicationBuilder(client)
builder.create_completion_application(account_id=account_id, application_name="test-app-builder",completion_model_id=model_deployment.id)
builder.process(query="what is the capital of Canada?")