Commit Graph

15 Commits

Author SHA1 Message Date
Luciano 0462ea0e38 Merge branch 'main' into feat-function-calling 2024-11-12 11:50:55 +08:00
Luciano Scarpulla 1709055e1a first basic working version (anthropic) 2024-11-12 11:48:27 +08:00
Siddhesh Agarwal fe2ca9d5f5 black + isort formatting 2024-11-10 20:00:13 +05:30
kennethreitz 33e53562ae Refactor conversation creation and message handling
This commit refactors the `create_conversation` function in `simplemind/__init__.py` to use a more descriptive variable name (`conv`) for the conversation object. It also updates the `add_plugin` method to use the new variable name (`conv`) instead of `conversation`.

In `simplemind/models.py`, the `prepend_system_message` method now accepts an optional `meta` parameter. The method also adds a system message to the conversation by prepending it to the list of messages.

Additionally, the `add_message` method in `simplemind/models.py` has been modified to include type annotations and a default value for the `role` parameter. The method now requires the `text` parameter to be provided explicitly.

A new test file, `tests/test_conversations.py`, has been added to the repository. This file contains a test case for the `generate_data` function, which tests the functionality of different LLM providers.

Lastly, the test files `tests/test_generate_data.py` and `tests/test_generate_text.py` have been modified to remove the unused `Amazon` provider from the list of test cases.
2024-11-02 11:24:26 -04:00
kennethreitz 1ff4c5660e Merge branch 'main' into feature/amazon-bedrock 2024-11-01 08:53:39 -04:00
Siddhesh Agarwal 3a7383425f sorted imports 2024-11-01 11:09:54 +05:30
Stan Zubarev 2a5966eb10 fix tests 2024-10-31 20:50:42 -04:00
kennethreitz febf5473d5 Refactor message parameter in Anthropic provider 2024-10-31 16:33:01 -04:00
kennethreitz c41a3f00fb Add test for generating text with different providers 2024-10-31 16:22:05 -04:00
kennethreitz 25ee4ae32c Add test for basic math 2024-10-31 16:21:59 -04:00
kennethreitz 984721f02b Add conftest.py with fixture for simplemind Session 2024-10-31 16:21:54 -04:00
kennethreitz 578f3fc11e cleanup 2024-10-28 18:21:25 -04:00
kennethreitz 3e3457d168 Refactor code structure and imports in simplemind package 2024-10-28 16:31:50 -04:00
kennethreitz 25b523e372 Refactor code structure and imports in simplemind package 2024-10-28 16:24:21 -04:00
kennethreitz 45e0eb5175 chore: Add base classes for chains and agents 2024-10-28 08:41:10 -04:00