Langroid

Latest version: v0.2.2

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

Scan your dependencies

Page 1 of 41

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

0.1.265

Minor:
* RedisCache: only warn _first_ time about missing pw
* Task: do not actually create cache (of type RedisCache) in definition; use classmethod to only create when first used -- this fixes Redis-related warnings that were shown simply when doing `import langroid as lr`

0.1.264

0.1.263

Page 1 of 41

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.