mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Interface cleanup
This commit is contained in:
parent
f33281c18d
commit
fb70552b57
2 changed files with 3 additions and 6 deletions
|
|
@ -4,7 +4,7 @@ import OpenAI from "openai"
|
|||
import { ApiHandler } from "../"
|
||||
import { ApiHandlerOptions, ModelInfo, openRouterDefaultModelId, openRouterDefaultModelInfo } from "../../shared/api"
|
||||
import { convertToOpenAiMessages } from "../transform/openai-format"
|
||||
import { ApiStream, ApiStreamChunk, ApiStreamUsageChunk } from "../transform/stream"
|
||||
import { ApiStreamChunk, ApiStreamUsageChunk } from "../transform/stream"
|
||||
import delay from "delay"
|
||||
|
||||
// Add custom interface for OpenRouter params
|
||||
|
|
@ -17,10 +17,7 @@ interface OpenRouterApiStreamUsageChunk extends ApiStreamUsageChunk {
|
|||
fullResponseText: string;
|
||||
}
|
||||
|
||||
// Interface for providers that support single completions
|
||||
export interface SingleCompletionHandler {
|
||||
completePrompt(prompt: string): Promise<string>
|
||||
}
|
||||
import { SingleCompletionHandler } from ".."
|
||||
|
||||
export class OpenRouterHandler implements ApiHandler, SingleCompletionHandler {
|
||||
private options: ApiHandlerOptions
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { ApiConfiguration } from "../shared/api"
|
||||
import { buildApiHandler } from "../api"
|
||||
import { OpenRouterHandler, SingleCompletionHandler } from "../api/providers/openrouter"
|
||||
import { OpenRouterHandler } from "../api/providers/openrouter"
|
||||
|
||||
/**
|
||||
* Enhances a prompt using the OpenRouter API without creating a full Cline instance or task history.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue