Type Definitions Reference
The@janhq/core library exports TypeScript types for building type-safe extensions. All types are extracted from the source code at ~/workspace/source/core/src/types/.
Model Types
Model
Represents a complete model definition.ModelInfo
Simplified model information used in requests.ModelSettingParams
Configuration settings for a model.ModelRuntimeParams
Runtime parameters for model inference.ModelMetadata
Metadata associated with a model.ModelArtifact
Represents a model file artifact.Message Types
ThreadMessage
Represents a message in a thread.MessageRequest
Request object for sending a message.MessageStatus
Status of a message.ThreadContent
Content within a message.ContentType
ErrorCode
Thread Types
Thread
Represents a conversation thread.ThreadAssistantInfo
Assistant information within a thread.ThreadState
State of a thread.Inference Types
ChatCompletionRole
Role of a message author.ChatCompletionMessage
Message format for chat completion.ChatCompletionMessageContent
Assistant Types
Assistant
Assistant configuration.AssistantTool
Tool configuration for assistants.Setting Types
SettingComponentProps
Configuration for extension settings.ControllerType
SliderComponentProps
CheckboxComponentProps
InputComponentProps
DropdownComponentProps
Interfaces
ModelInterface
Interface for model management extensions.InferenceInterface
Interface for inference extensions.Usage Example
All types are automatically exported from
@janhq/core. Import only what you need for better tree-shaking.