From 2c1961904eda616ffdcb7b6e3804a6cfd876f4ca Mon Sep 17 00:00:00 2001 From: Filip Michalsky Date: Fri, 8 Sep 2023 13:46:14 -0400 Subject: [PATCH 1/3] update test --- tests/test_salesgpt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_salesgpt.py b/tests/test_salesgpt.py index c0f5ce63..397328f0 100644 --- a/tests/test_salesgpt.py +++ b/tests/test_salesgpt.py @@ -118,7 +118,8 @@ def test_valid_inference_stream(self, load_env): @pytest.mark.asyncio async def test_valid_async_inference_stream(self, load_env): - llm = ChatOpenAI(temperature=0.9) + # llm = ChatOpenAI(temperature=0.9) + llm = ChatLiteLLM(temperature=0.9) model_name = "gpt-3.5-turbo" sales_agent = SalesGPT.from_llm( From 58008f0315cbd144c21bd7a68c418a0ebe8b22b3 Mon Sep 17 00:00:00 2001 From: Filip Michalsky Date: Fri, 8 Sep 2023 14:00:07 -0400 Subject: [PATCH 2/3] bump version and update test --- salesgpt/version.py | 2 +- tests/test_salesgpt.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/salesgpt/version.py b/salesgpt/version.py index ac9a53d7..e1b62911 100644 --- a/salesgpt/version.py +++ b/salesgpt/version.py @@ -1,3 +1,3 @@ """Version information.""" -__version__ = "0.0.6" +__version__ = "0.0.7" diff --git a/tests/test_salesgpt.py b/tests/test_salesgpt.py index 50b294c6..9ec59bc4 100644 --- a/tests/test_salesgpt.py +++ b/tests/test_salesgpt.py @@ -119,7 +119,7 @@ def test_valid_inference_stream(self, load_env): @pytest.mark.asyncio async def test_valid_async_inference_stream(self, load_env): - # llm = ChatOpenAI(temperature=0.9) + llm = ChatLiteLLM(temperature=0.9) model_name = "gpt-3.5-turbo" From 1f773545a5af6aa5b6f484de4e0466b88ac75214 Mon Sep 17 00:00:00 2001 From: Filip Michalsky Date: Fri, 8 Sep 2023 14:12:33 -0400 Subject: [PATCH 3/3] update docs and files w litellm --- CHANGELOG.txt | 6 ++++++ README.md | 12 +++++++----- examples/streaming_generator_example.py | 9 ++------- salesgpt/salesgptapi.py | 2 +- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 31228491..7ce46b23 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,11 @@ Updates to the SalesGPT project: Building the world's best AI Sales Agents. +September 8 2023 +--------------- +Version 0.0.7 +- SalesGPT is now compatible with LiteLLM - choose any closed/open-sourced LLM +to work with SalesGPT. + August 23 2023 --------------- Version 0.0.6 diff --git a/README.md b/README.md index a9facda0..9abf2c48 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Please send an email to [the repo author](mailto:filipmichalsky@gmail.com). ## :red_circle: Latest News - Sales Agent can now take advantage of **tools**, such as look up products in a product catalog! +- SalesGPT is now compatible with [LiteLLM](https://github.com/BerriAI/litellm), choose any closed/open-sourced LLM to work with SalesGPT! Thanks to LiteLLM maintainers for this contribution! ### Demo: Outbound Prospecting from Crusty AI: A New Way to Sell? 🤔 @@ -37,7 +38,7 @@ Please send an email to [the repo author](mailto:filipmichalsky@gmail.com). ```python import os from salesgpt.agents import SalesGPT -from langchain.chat_models import ChatOpenAI, ChatLiteLLM +from langchain.chat_models import ChatLiteLLM os.environ['OPENAI_API_KEY'] = 'sk-xxx' # fill me in @@ -128,7 +129,7 @@ As such, this agent can have a natural sales conversation with a prospect and be ## Installation -Make sure your have a python 3.10+ and run: +Make sure your have a **python 3.10+** and run: `pip install -r requirements.txt` @@ -165,14 +166,15 @@ Follow me at [@FilipMichalsky](https://twitter.com/FilipMichalsky) ## SalesGPT Roadmap - [high priority] Sell your soul. -- [high priority] Add support for multiple LLMs backends [PR in progress here](https://github.com/filip-michalsky/SalesGPT/pull/36) - [high priority] Improve reliability of the parser [issue here](https://github.com/filip-michalsky/SalesGPT/issues/26) and [here](https://github.com/filip-michalsky/SalesGPT/issues/25) - Add example implementation of OpenAI functions agent[issue here](https://github.com/filip-michalsky/SalesGPT/issues/17) - Add support for multiple tools [issue here](https://github.com/filip-michalsky/SalesGPT/issues/10) -- Add an agent controller for whne stages need to be traversed linearly without skips [issue here](https://github.com/filip-michalsky/SalesGPT/issues/19) -- Add `tool_getter` to choose a tool based on vector distance to the taks needed to be done +- Add an agent controller for when stages need to be traversed linearly without skips [issue here](https://github.com/filip-michalsky/SalesGPT/issues/19) +- Add `tool_getter` to choose a tool based on vector distance to the tasks needed to be done - What tools should the agent have? (e.g., the ability to search the internet) - Add the ability of Sales Agent to interact with AI plugins on your website (.well-known/ai-plugin.json) + +~~-- [high priority] Add support for multiple LLMs backends [PR in progress here](https://github.com/filip-michalsky/SalesGPT/pull/36)~~- ~~- Add the ability to stop generation when user interupts the agent~~ diff --git a/examples/streaming_generator_example.py b/examples/streaming_generator_example.py index d59160fa..025c665f 100644 --- a/examples/streaming_generator_example.py +++ b/examples/streaming_generator_example.py @@ -4,13 +4,8 @@ from salesgpt.agents import SalesGPT -with open(".env", "r") as f: - env_file = f.readlines() -envs_dict = { - key.strip("'"): value.strip("\n") - for key, value in [(i.split("=")) for i in env_file] -} -os.environ["OPENAI_API_KEY"] = envs_dict["OPENAI_API_KEY"] +from dotenv import load_dotenv +load_dotenv() llm = ChatLiteLLM(temperature=0.9) diff --git a/salesgpt/salesgptapi.py b/salesgpt/salesgptapi.py index c6b4a732..d5f6b82d 100644 --- a/salesgpt/salesgptapi.py +++ b/salesgpt/salesgptapi.py @@ -1,6 +1,6 @@ import json -from langchain.chat_models import ChatOpenAI, ChatLiteLLM +from langchain.chat_models import ChatLiteLLM from salesgpt.agents import SalesGPT