Langroid

Latest version: v0.2.2

Safety actively analyzes 638452 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 41

0.1.256

Add pyyaml dependency

0.1.254

* All doc-parsers are now extra dependencies, and won't be installed with core langroid. As a convenience, extras can be installed in groups,
e.g.
- `doc-chat` will get all document parsers, and
- `db` will get all database-related dependencies

For example, you can get both these groups using


pip install "langroid[doc-chat,db]"

0.1.253

* Slim down langroid -- Make several dependencies optional, to be installed via "extras". See `pyproject.toml`. This should help reduce build size for production use, as well as improve script startup times. In DocChatAgent, if LanceDB is available, we use it, else we use QdrantDB (which is installed with core langroid).
* ToolMessage.examples(): each example can now either be a tool instance, or a tuple (description, tool_instance),
where the description is a natural language "thought" that leads to the tool usage. In some scenarios this
can enhance reliability of tool-generation.

0.1.252

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

0.1.251

* (Exact) Infinite-loop detection, see [Task._maybe_infinite_loop](https://github.com/langroid/langroid/blob/main/langroid/agent/task.py);
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

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.

Page 3 of 41

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.