Initial commit
This commit is contained in:
Vendored
+36
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* OpenRouter LLM Provider
|
||||
* Handles communication with OpenRouter API for LLM interactions
|
||||
*/
|
||||
import { LlmProvider, LlmConfig, ActionRequest, ActionResponse, NarrativeRequest, NarrativeResponse } from '../interfaces/llm';
|
||||
export declare class OpenRouterProvider implements LlmProvider {
|
||||
private apiKey;
|
||||
private model;
|
||||
private client;
|
||||
private temperature;
|
||||
private maxTokens;
|
||||
/**
|
||||
* Initialize the OpenRouter provider with configuration
|
||||
*/
|
||||
initialize(config: LlmConfig): Promise<void>;
|
||||
/**
|
||||
* Translate player input into a structured action for the game engine
|
||||
*/
|
||||
translateAction(request: ActionRequest): Promise<ActionResponse>;
|
||||
/**
|
||||
* Generate narrative prose based on game events
|
||||
*/
|
||||
generateNarrative(request: NarrativeRequest): Promise<NarrativeResponse>;
|
||||
/**
|
||||
* Build the system and user prompts for action translation
|
||||
*/
|
||||
private buildActionPrompt;
|
||||
/**
|
||||
* Build the system and user prompts for narrative generation
|
||||
*/
|
||||
private buildNarrativePrompt;
|
||||
/**
|
||||
* Validate and normalize the action response
|
||||
*/
|
||||
private validateActionResponse;
|
||||
}
|
||||
Reference in New Issue
Block a user