Implement the ag command to call the DeepSeek:v3 model in the command line.
- Python 3.10.12
- pip 25.0.1
- openai
pip install openaiFor domestic installation, you can use mirror installation, the command is as follows:
pip install openai -i https://pypi.tuna.tsinghua.edu.cn/simple- load-dotenv
pip install load-dotenv- clone repo
git clone https://github.com/shenjy712/ag.git.envfile
API_KEY=
API_BASE_URI=https://api.siliconflow.cn
MODEL=deepseek-ai/DeepSeek-V3
The large model API used above is the API of Silicon Flow. You can also use the API of Silicon Flow, Register Silicon Flow
-
After generating the API key, fill in the API key after
API_KEY=in the.envfile -
execute following command
# Add executable permissions
chmod +x ag.py
# Copy the command to the /usr/local/bin directory and change the name to ag
mv ag.py /usr/local/bin/ag
# Move the .env file to the same directory
mv .env /usr/local/bin/- Now you can use the
agcommand in the command line to call theDeepSeek:v3model.
over~