Maintain consistent parameter names and interface patterns across LLM implementations to improve maintainability and prevent integration issues. This includes:
Maintain consistent parameter names and interface patterns across LLM implementations to improve maintainability and prevent integration issues. This includes:
Example:
// INCORRECT
if (!llm.bindTools) {
throw new LLMServiceError("LLM doesn't support binding tools");
}
const tokens = llmOutput?.tokenUsage?.completionTokens;
// CORRECT
if (typeof llm.withStructuredOutput !== 'function') {
throw new LLMServiceError("LLM doesn't support structured output");
}
const tokens = llmResult?.llmOutput?.tokenUsage?.completionTokens;
This standardization:
Enter the URL of a public GitHub repository