Releases: langroid/langroid
0.1.252
0.1.251
-
(Exact) Infinite-loop detection, see Task._maybe_infinite_loop;
Throw InfiniteLoopException when a possible infinite loop is detected.
By default, loops of up to 10 messages are detected (configurable). Note that "Exact" loop detection means this only detects exactly-repeating cycles of k messages (k <= 10), e.g. a n i m a l m a l m a l m a l...
In other words we don't detect cases where the LLM (or other entity) is generating "essentially the same, but slightly different message" repeatedly.Configs for Infinite loop detection are in
TaskConfig
inTask.py
. -
Global settings.max_turns (default -1, meaning not used) can additionally be used to guard against infinite loops. In pytest conftest.py it is set to 100, so any task will run at most 100 turns.
-
Tolerant tool detection when
request
field is insideproperties
field -
"@" message addressing: any entity can address any other entity of the agent ("llm", "user", "agent"), or any other sub-task by name. This is an alternative to using "SEND_TO:<entity_name>", or using the
RecipientTool
to address messages to a specific recipient. The advantage of using RecipientTool is that since it is a tool, the tool handler fallback method can detect that the tool is not being used, and send a reminder to the LLM to clarify who it is addressing the message to. -
In non-interactive mode, wait for user input if "user" is explicitly addressed
-
Misc improvements:
ToolMessage
instructions reminding LLM to userequest
field (gpt-4o often forgets).RecipientTool
: allow default recipient- Bug fix: chainlit examples that had modifiable LLM settings were not using the changed LLM, but now do
0.1.250
Added RetrievalTool: to be used by DocChatAgent (or subclasses) to simply get relevant passages,
and skip the final LLM answer-generation.
This enables designing Agents that are instructed to take other actions based on these passages, besides generating an answer summary.
0.1.249
0.1.248
Set defalt tokenizer in case tiktoken.encoding_for_model() fails
0.1.247
Agent: during init, set config.parsing.token_encoding_model
to the LLM,
so we use the tokenizer specific to the LLM, which helps with accurate token-cost computation.
(only affects OpenAI LLMs currently).
0.1.246
- Fix ChainlitTaskCallbacks - use classmethod not staticmethod, so any derived versions propagate to subtasks
- Handle deviant OpenAI LLM function-call generation (esp w gpt-4o), e.g. functions with name "functions", or "functions xyz"
0.1.245
- Improve LanceDocChatAgent and Query Planner to handle deviations.
- Handle function-call odditities in OpenAI LLM -- they can generate an unnecessary "name" field, which we override with the "request" field from the arguments.
0.1.244
- Tweaks to LanceDocChatAgent and related Agents (QueryPlanner, Critic, etc) to accomodate deviations
- In multi-agent chats, so total cost across all agents, in addition to cumul cost of current agent
0.1.243
Update toml to latest DuckDuckGo (6.0.0) so we no longer get the rate limit error