git-svn-id: svn://home0/lm-lib@3644 71dcc7fd-b1f2-4e5d-bb8e-274146e81173
This suite of Java packages provides a comprehensive framework for building and deploying conversational agents powered by language models.
Purpose:
The primary purpose is to simplify the development and management of AI-driven chatbot applications.
Functionality:
- Agent Framework: The core package enables the creation of agents capable of interacting with language models, processing text, maintaining conversation context, tracking statistics, and executing in a structured manner. It supports chaining agents, handling responses, and flexible configuration.
- Language Model Interaction: Several packages provide tools for interacting with various language models, including Azure AI's text generation service and remote text completion models. These tools handle tasks like retrieving models, managing conversations, generating completions, and tracking API usage.
- Prompt Engineering: A dedicated package focuses on constructing and manipulating prompts tailored to specific language models. It supports different formatting strategies and allows for fine-grained control over prompt structure.
- Tokenization: Another package handles text tokenization and detokenization, crucial for preparing text for input to language models and interpreting their outputs.
Overall, this collection of packages offers a powerful and flexible toolkit for developers looking to build sophisticated conversational agents leveraging the capabilities of modern language models.
gemma2-27b requests=50, requestDuration=PT3M36.921314511S, inTokens=26737, outTokens=2207, tps=10.217592592592593
[Below announcement has been generated by the unit test AgentTest#agenticFlow:]
Title: Introducing a Powerful Framework for Building Intelligent Agents
We're excited to announce the development of a new Java codebase designed to build intelligent agents capable of interacting with language models like GPT. This framework offers a flexible and extensible architecture, empowering developers to create sophisticated conversational agents for a wide range of applications.
Key Features:
-
Concurrent Text Processing: Leveraging Java's
CompletableFutureandExecutorService, the framework enables parallel processing of text chunks, significantly speeding up agent execution. -
Response-Driven Agent Selection: The
chooseNextAgentmethod intelligently selects the next agent in the chain based on the response received from the language model, allowing for dynamic and adaptive conversations. -
Customizable Response Handling: Each agent can be equipped with a custom
responseHandlerto parse and interpret responses from the language model, enabling tailored logic for specific tasks. -
Dynamic Agent Chaining: Agents can be chained together to create complex, multi-step interactions, with each agent specializing in a particular task and passing context to the next.
-
Contextualized Agent Execution: The framework utilizes an
AgentContextobject to store and share information between agents, ensuring each agent has access to the relevant context for its task.
How it Works:
The framework revolves around the Agent class, which defines an agent's behavior and interaction with the language model. Each agent receives an AgentContext containing relevant information, processes text using its defined template, interacts with the language model, and then uses its responseHandler to interpret the response. Based on the response, the chooseNextAgent method determines the next agent in the chain.
Benefits:
This framework offers several advantages for developers:
- Flexibility: Easily customize agent behavior through configurable parameters and custom response handlers.
- Extensibility: Add new agent types and functionalities as needed.
- Efficiency: Parallel processing and dynamic agent chaining optimize performance.
- Adaptability: Agents can respond intelligently to changing conversation contexts.
Looking Ahead:
We believe this framework has the potential to revolutionize the way we build conversational agents. We're actively developing new features and functionalities, and we encourage the community to contribute and explore the possibilities.
Stay tuned for more updates and documentation!
Graph: M, CodeSummarizer, ↴, M, FeatureIdentifier, →, ⇉ 3/5, M, FeatureAnalyzer, →, 5↣1, M, AnswerGenerator gemma2-27b requests=8, inTokens=19646, outTokens=2784, requestDuration=PT7M38.309006603S, getAbsoluteDuration()=PT3M54.653718763S, getTps()=95.59, getOutTps()=11.86