Skip to content

Model capability data struct proposal #10

@LemonNekoGH

Description

@LemonNekoGH
interface Endpoint {
  name: string
  description: string
  endpoint: string
  childCapabilities: Parameter[]
  outputModality: 'text' | 'image' | 'audio' | 'video' | 'mesh'
}

interface Parameter {
  name: string
  description: string
  parameterName: string
  parameterSchema?: string | number | boolean // If it's a object, should be described in the child capabilities
  childCapabilities?: Parameter[]
}

interface Model {
  providerId: string
  id: string
  name: string
  description: string
  // other fields...
  endpoints: Endpoint[]
}

type Capability = Endpoint | Parameter

/**
 * @param capabilityPath The path to the capability, like JSON path, like `image_generation.image_size` or `image_generation.image_size.width` or `image_generation.image_size.width.height`
 * @returns The capabilities at the path, if not found, won't include it in the result.
 */
type QueryCapabilityFunction = (providerId: string, modelId: string, capabilityPath: string[]) => Promise<Capability[]>

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions