2025-02-04 12:45:17 -05:00

33 lines
674 B
TypeScript

export interface LLMConfig {
provider: 'ollama';
model: string;
baseUrl: string;
temperature: number;
}
export interface DocumentMetadata {
path: string;
type: string;
lastModified: number;
size: number;
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')
};
}