Langroid

Latest version: v0.2.2

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

Scan your dependencies

Page 25 of 41

0.1.120

Re-enable `litellm` as an extra, since it is now compatible with OpenAI v1 API

0.1.119

Minor: OpenAIAssistant default use_functions_api=True

0.1.118

Minor update: OpenAIAssistant default to gpt4-turbo

0.1.117

Minor Update of 0.1.116. Please see that release for notes.

0.1.116

Support for OpenAI Assistant API.
This has been gradually extended over several releases, so summarizing here:
You can define a Langroid OpenAIAssistant as a subclass of ChatAgent.
These agents can be used as drop-in replacements for ChatAgent within tasks, and work seamlessly
with Langroid's task orchestration.

The OpenAIAssistant agent leverages several features of the OpenAI Assistant API:
* conversation state (so no need to maintain conv state as in ChatAgent)
* thread, assistant persistence with caching: thread_id, assistant_id are cached based on user/machine/org and can be resumed across sessions.
* Tools: Function-calling, Retrieval, Code-Interpreter
* File uploads

Until docs are ready, it's best to see these examples:

Tests:
* [test_openai_assistant.py](https://github.com/langroid/langroid/blob/main/tests/main/test_openai_assistant.py)
* [test_openai_assistant_async.py](https://github.com/langroid/langroid/blob/main/tests/main/test_openai_assistant_async.py)

Example scripts:
* [examples/basic/oai-asst-chat.py](https://github.com/langroid/langroid/blob/main/examples/basic/oai-asst-chat.py) The most basic simple chat
* [examples/basic/oai-code-chat.py](https://github.com/langroid/langroid/blob/main/examples/basic/oai-code-chat.py) Chat with code interpreter.
* [examples/docqa/oai-retrieval-assistant.py](https://github.com/langroid/langroid/blob/main/examples/docqa/oai-retrieval-assistant.py) Basic retrieval
(RAG) chat.
* [examples/docqa/oai-retrieval-2.py](https://github.com/langroid/langroid/blob/main/examples/docqa/oai-retrieval-2.py) 2-agent chat with retrieval

0.1.114

Support OpenAI Assistant tools:
* Retrieval tool
* Function-calling
These work seamlessly with Langroid's multi-task interaction.
Until docs are ready, see these tests:
- [`test_openai_assistant.py`](https://github.com/langroid/langroid/blob/main/tests/main/test_openai_assistant.py),
- [`test_openai_assistant_async.py`](https://github.com/langroid/langroid/blob/main/tests/main/test_openai_assistant_async.py)

Page 25 of 41

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.