Commit Graph

391 Commits

Author SHA1 Message Date
kennethreitz 44fd3468fa Revert "Merge pull request #37 from lucianosrp/fix-sys-role-anthropic"
This reverts commit 5770c37edf, reversing
changes made to a5c7486dfc.
2024-11-04 11:21:07 -05:00
kennethreitz 5770c37edf Merge pull request #37 from lucianosrp/fix-sys-role-anthropic
fix: anthropic system message
2024-11-04 11:14:20 -05:00
kennethreitz 37334a21c5 Update simplemind/providers/anthropic.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-11-04 11:14:02 -05:00
Luciano Scarpulla 57d54abf24 remove unrelted changes 2024-11-04 17:23:48 +08:00
Luciano Scarpulla c3397488e3 fix: antropic system message 2024-11-04 17:18:59 +08:00
kennethreitz a5c7486dfc oops 2024-11-03 10:17:36 -05:00
kennethreitz 5c6650f2b2 add it to the repo 2024-11-03 10:17:20 -05:00
kennethreitz 549d74e146 Refactor recipe printing for better formatting and styling 2024-11-03 07:24:16 -05:00
kennethreitz 328be94677 Revert "Merge pull request #35 from barisozmen/logger-for-streaming"
This reverts commit d7f8418f23, reversing
changes made to cb73621e39.
2024-11-03 07:17:44 -05:00
kennethreitz 7b21b9f258 improve logging for streaming functions 2024-11-03 07:08:03 -05:00
kennethreitz d7f8418f23 Merge pull request #35 from barisozmen/logger-for-streaming
[Suggestion] Improved logging to handle streaming functions.
2024-11-03 07:07:14 -05:00
kennethreitz 9968f162d6 Update simplemind/logging.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-11-03 07:07:04 -05:00
kennethreitz cb73621e39 rename file 2024-11-03 07:03:51 -05:00
kennethreitz 4721dd8cc0 Add Bible Explorer web app with endpoints for retrieving Bible verses and chapter counts 2024-11-03 07:03:09 -05:00
kennethreitz bdb1ff0e69 Update default model for Amazon provider 2024-11-03 06:56:26 -05:00
kennethreitz 94f381032e Update DEFAULT_MODEL in amazon.py 2024-11-03 06:55:56 -05:00
kennethreitz b3a35cadd4 Update DEFAULT_MODEL in amazon.py 2024-11-03 06:55:37 -05:00
kennethreitz 718f5a66c0 Refactor AI model sessions and user input handling 2024-11-03 06:53:26 -05:00
Barış Özmen 9dd89b7ef1 logging now takes into account streaming functions + logfire API now uses span and structured outputs 2024-11-03 01:07:58 +03:00
kennethreitz 15ee5d1cf9 Add four-way conversation example 2024-11-02 17:27:09 -04:00
kennethreitz 25ba1a9289 update function annotations 2024-11-02 17:15:03 -04:00
kennethreitz 22aff505c4 Update README.md 2024-11-02 17:11:20 -04:00
kennethreitz 29b2008edf Update README.md 2024-11-02 17:10:45 -04:00
kennethreitz c5c99a05fd Update README.md 2024-11-02 17:06:47 -04:00
kennethreitz cb969dec4c Update README.md 2024-11-02 17:06:12 -04:00
kennethreitz 1aeeb9127d Update README.md 2024-11-02 17:05:02 -04:00
kennethreitz c21f68aad6 Add streaming support to Gemini provider and update example script 2024-11-02 16:54:49 -04:00
kennethreitz a68bd74fd8 Add streaming support and update documentation 2024-11-02 16:54:36 -04:00
kennethreitz 4d2c81850e Add streaming support to Groq provider and implement generate_stream_text method v0.2.2 2024-11-02 16:51:35 -04:00
kennethreitz 64246658b0 Add streaming support to Amazon provider 2024-11-02 16:50:09 -04:00
kennethreitz f0aff7814b Add streaming support to Amazon provider and implement generate_stream_text method 2024-11-02 16:49:55 -04:00
kennethreitz 72121c121d Add streaming support to Gemini provider and implement generate_stream_text method 2024-11-02 16:48:59 -04:00
kennethreitz 028e89b080 Refactor generate_stream_text.py to use the "gemini" provider for streaming text generation 2024-11-02 16:48:54 -04:00
kennethreitz e13d03f40b Add streaming support to Anthropic provider and implement generate_stream_text method 2024-11-02 16:46:58 -04:00
kennethreitz 0fc49c7e13 Add streaming support to Ollama provider and implement generate_stream_text method 2024-11-02 16:44:32 -04:00
kennethreitz d6afbd1fd0 Add streaming support to XAI provider and update example usage 2024-11-02 16:42:28 -04:00
kennethreitz 27d30ccfe8 Add OpenAI streaming support and enhance provider properties 2024-11-02 16:34:47 -04:00
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