2025-02-09 02:09:16 -05:00

36 lines
742 B
TypeScript

export interface LLMConfig {
provider: 'ollama';
model: string;
baseUrl: string;
temperature: number;
}
export interface DocumentMetadata {
path: string;
type: string;
lastModified: number;
size: number;
createdAt?: string;
modifiedAt?: string;
accessedAt?: string;
hasEmbeddings?: boolean;
hasOcr?: boolean;
}
export class ServiceError extends Error {
constructor(message: string) {
super(message);
this.name = 'ServiceError';
}
}
// For CommonJS compatibility
if (typeof module !== 'undefined' && module.exports) {
module.exports = {
ServiceError,
// Export interface types for TypeScript
LLMConfig: Symbol.for('LLMConfig'),
DocumentMetadata: Symbol.for('DocumentMetadata')
};
}