Skip to content

Ellioben/CLI-difycall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CLI-difycall

CLI-difycall is a simple command line tool to chat with different Dify AI platforms.

Setup

  1. Install requirements:
pip install -r requirements.txt
  1. Configure your Dify API:
  • Copy config.example.py to config.py
  • Add your Dify API endpoints and keys in config.py
  1. Fix SSL warning (if you see urllib3 SSL warning):
# Option 1: Downgrade urllib3
pip install urllib3==1.26.6

# Option 2: Upgrade OpenSSL (on Mac)
brew install [email protected]

How to Use

Basic usage:

python main.py -p <platform> -m "your message"

Options

  • -p or --platform: Choose the AI platform (required)
  • -m or --message: Your message to send (required)

Examples

Simple chat:

python main.py -p wechat -m "Hello, what's the weather?"

Available Platforms

You can use these platforms:

  • wechat
  • telegram
  • (other platforms from your config)

Error Messages

If something goes wrong, you will see:

  • Wrong platform error
  • Connection error
  • Other error messages

Need Help?

Run this to see all options:

python main.py --help

Troubleshooting

If you see "400 BAD REQUEST" error:

  1. Check if your Dify API service is running
  2. Verify your API endpoints in config.py
  3. Make sure your platform configuration is correct
  4. Check if your API key is valid

Common issues:

  • API service not running (check if http://127.0.0.1 is correct)
  • Wrong API endpoint
  • Invalid API key
  • Platform not properly configured

SSL/TLS Issues:

  • If you see urllib3 SSL warning, you can:
    1. Downgrade urllib3: pip install urllib3==1.26.6
    2. Upgrade OpenSSL (recommended for Mac users): brew install [email protected]
    3. Ignore the warning if everything works fine

About

A simple command line tool to chat with different Dify AI platforms.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages