import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});
const response = await client.applications.process({
edges: [{ from_field: 'from_field', from_node: 'from_node', to_field: 'to_field', to_node: 'to_node' }],
inputs: { foo: { foo: 'bar' } },
nodes: [{ id: 'id', application_node_schema_id: 'text_input_schema' }],
version: 'V0',
});
console.log(response);{
"errors": [
{
"error_code": "INVALID_APPLICATION_NO_INPUT_NODE",
"message": "<string>"
}
],
"sgp_error_code": "APPLICATION_BUILDER_VALIDATION_ERROR"
}import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});
const response = await client.applications.process({
edges: [{ from_field: 'from_field', from_node: 'from_node', to_field: 'to_field', to_node: 'to_node' }],
inputs: { foo: { foo: 'bar' } },
nodes: [{ id: 'id', application_node_schema_id: 'text_input_schema' }],
version: 'V0',
});
console.log(response);{
"errors": [
{
"error_code": "INVALID_APPLICATION_NO_INPUT_NODE",
"message": "<string>"
}
],
"sgp_error_code": "APPLICATION_BUILDER_VALIDATION_ERROR"
}Input data for the application. You must provide inputs for each input node
Show child attributes
List of nodes in the application graph
Show child attributes
List of edges in the application graph
Show child attributes
Version of the application schema
"V0"History of the application
Show child attributes
Execution override options for agentic applications
Show child attributes
Control to have streaming of the endpoint. If the last node before the output is a completion node, you can set this to true to get the output as soon as the completion node has a token
Arbitrary user-defined metadata that can be attached to the process operations and will be registered in the interaction.
Successful Response