Langroid

Latest version: v0.2.5

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

Scan your dependencies

Page 1 of 42

0.2.5

Remove python version upper bound constraint < 3.12; instead set it to ^3.10, so it doesn't break builds with Python 3.12

0.2.4

* Task: fix user addressing
* Task: more frequent "alternating no-answer" loop detection

0.2.3

Task: detect alternating NO_ANSWER loops (i.e. DO-NOT-KNOW alternating with variable other msgs) when `allow_null_result` is set to `True`
(default is `False` and `True` is not normally used)

0.2.2

* New `TaskConfig` param: `logs_dir` to control where your task/multi-agent logs go (default is `logs`)
* Improvements in `Task` result, `step` result logic (to be detailed later).

0.2.1

Pin Chainlit to 1.1.202, as later versions have very unintuitive behavior and break all our examples.
See especially this breaking change -- https://docs.chainlit.io/guides/migration/1.1.300#rework-chain-of-thought

See this example as an illustration:
https://github.com/langroid/langroid/blob/main/examples/chainlit/test-step-nesting.py

0.2.0

- `ChatDocument, ChatAgent` now have auto-created ids, and id -> obj map is stored in `ObjectRegistry`
- This registry enables a variety of lineage-related pointers to be kept:
- In `Task`, we keep parent/child relations as `pending_message` evolves
- An Agent's `message_history`, each message has a `chat_document_id` pointing to the corresponding `ChatDocument`
- `ChatDocument.metadata` has:
- `agent_id` to indicate which Agent it was created from, and
- `msg_idx` indicates which message in agent's `message_history` it corresponds to
- New tool, `RewindTool` can be used by an Agent to "rewind and redo" its Nth Assistant message
(all dependent messages in this and another agent are cleared out, thanks to the lineage links). This is intended to mimic how a human often uses a chat platform (like ChatGPT) -- in a long conversation that has become messy (with too many distracting details), based on the conversation so far, they often realize of a better way to ask an earlier question, and go back and "edit and re-submit" this past message, which often gets dramatically better responses.
When used appropriately by Agents, this can result in much cheaper, faster and more accurate results. Examples coming soon but see [this test](https://github.com/langroid/langroid/blob/main/tests/main/test_task_lineage_rewind.py) for a toy usage example
- `Task.add_sub_task` now takes as args either tasks or tuples of `[Task, TaskConfig]` where `TaskConfig` dictates how the task should behave _as a subtask_. Currently the main param is the boolean `TaskConfig.restart_as_subtask`,
which determines whether or not this task resets Agent history on _every_ run when invoked by a parent Task.
This new API enables more granular control on how subtasks behave.
- `Task` constructor `restart` param semantics: When `True` this restarts all agents (including those of sub-tasks recursively) whenever the top level task is run

Page 1 of 42

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.