kennethreitz
b6b1a4f9f3
Add streaming support to generate_text method and refactor related functions
2024-11-02 16:32:30 -04:00
Barış Özmen
36d6ca4a11
example of stream text generation on openai added
2024-11-02 22:15:23 +03:00
Barış Özmen
90593d7919
genereate_stream_text() method added to simplemind
2024-11-02 22:15:23 +03:00
Barış Özmen
efe1a62d73
text streaming ability added to OpenAI provider
2024-11-02 22:15:23 +03:00
kennethreitz
92819112bb
Refactor medication data example to use Rich formatting for improved readability
2024-11-02 12:27:51 -04:00
kennethreitz
275ab39d67
Add medication data example to the repository
2024-11-02 12:24:41 -04:00
kennethreitz
74db69c6e9
Refactor llm_provider and add AI perspective in bible_verses.py example
2024-11-02 12:09:17 -04:00
kennethreitz
7b633ce880
Refactor imports and update llm_provider in bible_verses.py example
2024-11-02 12:02:06 -04:00
kennethreitz
a651afb8a6
Refactor imports in _context.py and add bible_verses.py example
2024-11-02 11:46:51 -04:00
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
931285f8ce
Update CHANGELOG.md to include version 0.2.2 and mention the default usage of system role in conv.prepend_system_message.
2024-11-02 11:24:07 -04:00
kennethreitz
e47ada4598
Update version to v0.2.2 in conf.py and pyproject.toml
2024-11-02 11:08:52 -04:00
kennethreitz
7e83532765
Update CHANGELOG.md to include version 0.2.2 and mention the default usage of system role in conv.prepend_system_message.
2024-11-02 11:08:25 -04:00
kennethreitz
34e8a9d190
Update sentiment_analysis.py
2024-11-02 11:04:12 -04:00
kennethreitz
c496712a9a
Merge pull request #32 from lucianosrp/fix-sys-prompt
...
fix: `prepend_system_message` use system role by default
2024-11-02 10:54:47 -04:00
Luciano Scarpulla
3d8e169a08
make prepend_system_message use system reole by default
2024-11-02 22:46:54 +08:00
kennethreitz
b74af7c8d8
Update discussion.py
2024-11-02 10:45:00 -04:00
kennethreitz
fa3ee731df
Refactor discussion.py to add MultiAIConversation class for orchestrating conversations between multiple AI models
2024-11-02 09:59:02 -04:00
kennethreitz
8e4fdb9832
Update README.md
2024-11-01 18:26:58 -04:00
kennethreitz
3d397d0474
Update README.md
2024-11-01 15:38:27 -04:00
kennethreitz
7508723469
Merge pull request #29 from barisozmen/fix-generate-data
...
Fix minor bug. generate_data() now passes kwargs to provider
2024-11-01 15:35:07 -04:00
Barış Özmen
f2a3fd76ae
fix minor bug. generate_data now passes the kwargs to provider
2024-11-01 22:10:19 +03:00
kennethreitz
089812e335
Update README.md
2024-11-01 12:14:47 -04:00
kennethreitz
e977dd3eab
Update README.md
2024-11-01 12:14:34 -04:00
kennethreitz
e7aad65b37
Update README.md
2024-11-01 12:13:56 -04:00
kennethreitz
a091a847a8
Update README.md
2024-11-01 12:13:46 -04:00
kennethreitz
faca663825
Merge pull request #28 from barisozmen/add-examples
...
Add cooking recipe example
2024-11-01 12:02:23 -04:00
kennethreitz
825ab22b95
Refactor pyproject.toml to include additional dependencies
2024-11-01 12:01:05 -04:00
kennethreitz
18a51c7cd3
Refactor pyproject.toml to include additional dependencies
2024-11-01 12:00:19 -04:00
kennethreitz
65570bfede
Add Dockerfile for project containerization
2024-11-01 11:56:18 -04:00
Barış Özmen
c6c7f2ac09
add print result as comments
2024-11-01 18:42:54 +03:00
Barış Özmen
cc6611647a
Recipe example from readme added to examples, with a new pretty string formatting
2024-11-01 18:41:40 +03:00
Barış Özmen
8f9036fa32
fix bug. send_hook changed to pre_send_hook
2024-11-01 18:40:08 +03:00
kennethreitz
b7b5e1e187
Bump version to 0.2.1 in pyproject.toml
2024-11-01 10:07:50 -04:00
kennethreitz
7220c8bd3f
Refactor Amazon provider to use cached_property for client and structured_client
2024-11-01 10:07:45 -04:00
kennethreitz
176045531a
Refactor Amazon provider to use cached_property for client and structured_client
2024-11-01 10:07:08 -04:00
kennethreitz
6dc9108836
Update README.md
2024-11-01 09:52:14 -04:00
kennethreitz
e8c5ebc6a8
Update table headers and add information about specifying provider or model in README.md
2024-11-01 09:48:19 -04:00
kennethreitz
2c26895010
Update table headers in README.md
2024-11-01 09:47:42 -04:00
kennethreitz
2f1c69a79e
i'm so indecisive
2024-11-01 09:46:32 -04:00
kennethreitz
bf1a936777
Update table header in README.md
2024-11-01 09:46:09 -04:00
kennethreitz
a4efa47f6e
Update table header in README.md
2024-11-01 09:45:36 -04:00
kennethreitz
3721fa6713
Update table headers in README.md
2024-11-01 09:44:54 -04:00
kennethreitz
db32ee26c1
Update table headers in README.md
2024-11-01 09:43:56 -04:00
kennethreitz
8797c9e82f
Update README.md
2024-11-01 09:39:51 -04:00
kennethreitz
ef01ce2f22
Update Groq model version in README.md
2024-11-01 09:36:50 -04:00
kennethreitz
d591125eb8
got i hate markdown tables
2024-11-01 09:36:05 -04:00
kennethreitz
225d00deee
Update table headers in README.md
2024-11-01 09:35:39 -04:00
kennethreitz
df716a1f19
Update provider and model information in README.md
2024-11-01 09:35:10 -04:00
kennethreitz
d6ad22721f
Update Groq model version in README.md
2024-11-01 09:34:14 -04:00