@nomyx/assistant
Version:
A powerful assistant library and cli for your AI projects. works with Vertex AI (Claude and Gemini)
16 lines (13 loc) • 513 B
text/typescript
import { AIProviderMiddleware } from '../types/provider';
import { ChatMessage } from '../types/chat';
import { ILogger } from '../types/common';
export class LoggingMiddleware implements AIProviderMiddleware {
constructor(private logger: ILogger) {}
async preProcess(messages: ChatMessage[]): Promise<ChatMessage[]> {
this.logger.debug('Pre-processing messages', { messageCount: messages.length });
return messages;
}
async postProcess(response: any): Promise<any> {
return response;
}
}