Query Specifications
Specification: Query Specifications
User Intent
Operation
TypeScript (Canonical)
import { Graphlit } from 'graphlit-client';
import { ModelServiceTypes, SpecificationTypes } from 'graphlit-client/dist/generated/graphql-types';
const graphlit = new Graphlit();
// Query all specifications
const specs = await graphlit.querySpecifications();
console.log(`Total specifications: ${specs.specifications.results.length}\n`);
specs.specifications.results.forEach(spec => {
console.log(`- ${spec.name} (${spec.type})`);
console.log(` Model: ${spec.serviceType}`);
});
// Search by name
const searchResults = await graphlit.querySpecifications({
search: 'GPT-4o'
});
console.log(`\nFound ${searchResults.specifications.results.length} GPT-4o specs`);
// Filter by type
const completionSpecs = await graphlit.querySpecifications({
types: [SpecificationTypes.Completion]
});
console.log(`\nCompletion specs: ${completionSpecs.specifications.results.length}`);Query all specifications (snake_case)
Filter by type
Parameters
SpecificationFilter (Optional)
Response
Developer Hints
Filter by Type
Variations
1. List All
2. Search by Name
3. Group by Type
Last updated