import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const response = await client.applications.validate({
edges: [{ from_field: 'from_field', from_node: 'from_node', to_field: 'to_field', to_node: 'to_node' }],
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: 'My API Key',
});
const response = await client.applications.validate({
edges: [{ from_field: 'from_field', from_node: 'from_node', to_field: 'to_field', to_node: 'to_node' }],
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"
}List of nodes in the application graph
Show child attributes
text_input_schema, text_output_schema, knowledge_base_input_schema, knowledge_base_schema, multi_knowledge_base_input_schema, multi_knowledge_base_schema, reranker_schema, prompt_engineering_schema, completion_model_input_schema, completion_model_schema, external_endpoint_schema, document_input_schema, map_reduce_schema, document_search_schema, document_prompt_schema Version of the application schema
"V0"Optional overrides for the application
Show child attributes
Show child attributes
Successful Response