Skip to content

A minimal LLM sales agent framework for sales agent fast deployment and benchmark. Support OpenAI models, Claude, HuggingFace models, Gemini, Ernie(文心一言4.0), Baichuan(百川), Qwen(通义千问), Moonshot(月之暗面), GLM(智谱), Deepseek. AI销售智能体微型框架.

License

Notifications You must be signed in to change notification settings

jackfsuia/ShampooSalesAgent

Repository files navigation

ShampooSalesAgent

A minimal LLM Agent Framework for Sales Agent Fast Deployment and Benchmark

license GitHub Release

English | 简体中文

  • A LLM-powered minimal agent that sells Shampoo for a living. Fluent conversation with customers on Web and will record their orders in a local .csv file.

  • Support OpenAI models, HuggingFace models, Claude, Gemini, Baichuan, Qwen, Moonshot, Ernie, Glm, Deepseek.

  • Very friendly for beginners, researchers and businessman who want to try things out quick.

Demo:

Updates

Quick Start

Run

git clone https://github.com/jackfsuia/ShampooSalesAgent.git && cd ShampooSalesAgent

After installing the requirements (gradio, openai, etc). Run

python start.py MODEL YOUR_KEY

MODEL can be gpt3.5/4, claude, gemini, baichuan, qwen, kimi, glm, deepseek.YOUR_KEY is your model API KEY. If you don't have a KEY, click the link on those model names to apply/buy.

But if you're using ernie, you should instead run

python start.py MODEL API_Key Secret_Key

API_Key and Secret_Key are defined by ernie, please refer to their website.

and if you're using huggingface model, just run

python start.py MODEL

That's all!

If you want to use CLI instead of web as interface, just use start_CLI.py instead of start.py.

By default, this agent proactively sells Shampoo. Write your own product information to product_description if you want to sell something else. The order infomation (name, address, phone number, purchase quantity, etc. provided by customers) will be printed to customer_orders.csv. The mission prompt is in normal_flow.py in case you want to change it.

Examples

Let's say you're using gpt-3.5-turbo as model, the KEY you bought is sdjkSOIjkdejs. Then you should be running

python start.py gpt-3.5-turbo sdjkSOIjkdejs

or for short (a few models have short names)

python start.py gpt sdjkSOIjkdejs

For gradio on Windows 10 to successfully work, you might have to download some mystery file that you have to turn off Windows Defender and add some folders to Defender exclusion list to do.

then the ouput will be something like this

path\ShampooSalesAgent>python start.py gpt sdjkSOIjkdejs
please go to one of the following  links to chat, and the second link can be shared public. If the link crash during chat, please keep clicking the Retry button located at the bottom of the chat page. if 
you need it to speak English, you can just say 'speak english' to it.(请点击以下任一网址进入聊天,第二个网址可以分享给其他人。聊天的时候崩溃请点聊天框下面的Retry按钮)
Running on local URL:  http://127.0.0.1:7860
Running on public URL: https://8fefa6c18e039476175.gradio.live

This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)

Both links work. Only the second link can be shared to public. Click the link, you'll see the web, and have a chat

the order infomation will be printed out to the CLI

This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)
2024-04-02 13:52:01.748677 <Jack Oliver><490 2nd St, Suite 300, New York><212555-1212><2 bottles><30 USD>
Customer order information has been written to customer_orders.csv

and customer_orders.csv. Open this .csv file, you'll see the order information line

2024-04-02 13:52:01.748677,Jack Oliver,"490 2nd St, Suite 300, New York",212555-1212,2 bottles,30 USD

has been added.

Do you like this project? Give us a ⭐

Model Evaluation—Who is the Sales Champion?

Run

python order_counting.py

you will find out. You can share your interesting results on this benchmark with us all.

Future Work

  • Finetune the model to be more professional at selling things, and talk more natural just like human. It is important to make people feel connections with each other, even with a robot (like the movie, her). 99% of people are not complex reasoning machines, but almost every one of them can make us feel warm and support at some point in life.
  • Support multimodal models. This might be simpler and soon.

License

ShampooSalesAgent is licensed under the MIT License found in the LICENSE file in the root directory of this repository.

Citation

If this work is helpful, please kindly cite as:

@article{ShampooSalesAgent,
  title={ShampooSalesAgent: A minimal LLM Sales Agent Framework for Sales Agent Fast Deployment and Benchmark}, 
  author={Yannan Luo},
  year={2024},
  url={https://github.com/gogogo22/ShampooSalesAgent}
}

Acknowledgement

This repo benefits from gradio, and the free models I have been using: baichuan, qwen, kimi, huggingface model. Thanks for their wonderful works. Thank gpt3.5/4 for open the imagination.

Table

A few models have short names.

Full Name Short Name
gpt-3.5-turbo gpt
gemini-pro gemini
claude-3-opus-20240229 claude
moonshot-v1-8k kimi
qwen1.5-72b-chat qwen
Baichuan2-Turbo baichuan
ERNIE-4.0-8K ernie
glm-4 glm
deepseek-chat deepseek

About

A minimal LLM sales agent framework for sales agent fast deployment and benchmark. Support OpenAI models, Claude, HuggingFace models, Gemini, Ernie(文心一言4.0), Baichuan(百川), Qwen(通义千问), Moonshot(月之暗面), GLM(智谱), Deepseek. AI销售智能体微型框架.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages