Skip to content

chatbot/llm-service

This page is auto-generated from TSDoc output. Edit the source file, not this Markdown.

  • Package: @leipzigtreechat/chatbot
  • Source file: packages/chatbot/src/llm-service.ts

OpenRouter client type used by the chatbot’s LLM service layer.

class LLMServiceError extends Data.TaggedError("LLMServiceError")<{
readonly operation: string;
readonly reason: unknown;
}>

Wraps failures from outbound LLM operations with the originating operation name.

Extends: Data.TaggedError("LLMServiceError")<{ readonly operation: string; readonly reason: unknown; }> Methods

  • constructor(operation: string, reason: unknown) Defined at: line 18
class OpenRouter extends Context.Tag("OpenRouter")<
OpenRouter,
{
readonly client: () => Effect.Effect<OpenRouterClient, never, never>;
}
>()

Effect service that provides access to the configured OpenRouter client.

Extends: `Context.Tag(“OpenRouter”)< OpenRouter, { readonly client: () => Effect.Effect<OpenRouterClient, never, never>; }

()` Properties

  • Live (unknown) Defined at: line 30
class LLMService extends Context.Tag("LLMService")<LLMService, LLMServiceInterface>()

Effect service that wraps all LLM-backed chatbot text generation.

Extends: Context.Tag("LLMService")<LLMService, LLMServiceInterface>() Properties

  • Live (unknown) Defined at: line 96
type OpenRouterClient = ReturnType<typeof createOpenRouter>

OpenRouter client type used by the chatbot’s LLM service layer.

Defined at: line 13