import { a as BaseAgent, b as AgentMeta, B as BaseAgentRunOptions } from '../../../base-C4dBV_Z9.js'; import { GetRunContext } from '../../../context.js'; import { C as Callback, E as Emitter } from '../../../emitter-l0W9gC1A.js'; import { BaseMemory } from '../../../memory/base.js'; import { ChatLLM, ChatLLMOutput } from '../../../llms/chat.js'; import { BaseMessage } from '../../../llms/primitives/message.js'; import { StreamlitAgentTemplates } from './prompts.js'; import { BaseLLMOutput } from '../../../llms/base.js'; import { TokenMemory } from '../../../memory/tokenMemory.js'; import '../../../errors.js'; import '../../../internals/types.js'; import '../../../internals/helpers/guards.js'; import '../../../internals/serializable.js'; import '../../../tools/base.js'; import 'ajv'; import 'promise-based-task'; import '../../../cache/base.js'; import '../../../internals/helpers/schema.js'; import 'zod'; import 'zod-to-json-schema'; import '../../../internals/helpers/promise.js'; import '../../../template.js'; /** * Copyright 2025 IBM Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ interface StreamlitAgentInput { llm: ChatLLM; memory: BaseMemory; templates?: Partial; } interface StreamlitRunInput { prompt: string | null; } interface Block { name: "text" | "app"; content: string; start: number; end: number; } interface Result { raw: string; blocks: Block[]; } interface StreamlitRunOutput { result: Result; message: BaseMessage; memory: BaseMemory; } interface StreamlitEvents { newToken: Callback<{ delta: string; state: Readonly<{ content: string; }>; chunk: BaseLLMOutput; }>; } declare class StreamlitAgent extends BaseAgent { protected readonly input: StreamlitAgentInput; emitter: Emitter; constructor(input: StreamlitAgentInput); get meta(): AgentMeta; set memory(memory: BaseMemory); get memory(): BaseMemory; protected _run(input: StreamlitRunInput, _options: BaseAgentRunOptions, run: GetRunContext): Promise; protected prepare(input: StreamlitRunInput): Promise<{ runMemory: TokenMemory; userMessage: BaseMessage | null; }>; protected parse(raw: string): Result; createSnapshot(): { input: StreamlitAgentInput; isRunning: boolean; }; } export { StreamlitAgent, type StreamlitAgentInput, type StreamlitEvents, type StreamlitRunInput, type StreamlitRunOutput };