Skip to content

Releases: langroid/langroid

0.1.252

28 May 14:31
Compare
Choose a tag to compare

Minor: validate agent.name format; friendlier task infinite loop warning (points out where to configure it)

0.1.251

28 May 01:19
Compare
Choose a tag to compare
  • (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 in Task.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 inside properties 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 use request 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

24 May 20:34
Compare
Choose a tag to compare

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

24 May 11:04
Compare
Choose a tag to compare
  • Improves RAG (DocChatAgent) citations. See here: #477
  • Update chainlit config.toml to show file-upload button in chats (their API for this changed, yet again)
  • Fix edge-cases involving rendering LLM output in non-streaming mode, and using rich spinner

0.1.248

20 May 14:11
Compare
Choose a tag to compare

Set defalt tokenizer in case tiktoken.encoding_for_model() fails

0.1.247

19 May 21:58
Compare
Choose a tag to compare

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

16 May 13:19
Compare
Choose a tag to compare
  • 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

15 May 22:47
Compare
Choose a tag to compare
  • 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

15 May 17:40
Compare
Choose a tag to compare
  • 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

14 May 19:55
Compare
Choose a tag to compare

Update toml to latest DuckDuckGo (6.0.0) so we no longer get the rate limit error