@极客时间《AI 大模型应用开发实战营》
1. 安装Python
-
下载链接🔗
https://www.python.org/downloads/release/python-3114/ -
验证安装
- 打开终端,并输入:
python3.11
- 打开终端,并输入:
-
简单实例
-
打开
IDLE,并输入:print("Hello World!") -
应输出:
Hello World!
-
-
替换镜像
- 阿里云 http://mirrors.aliyun.com/pypi/simple/
- 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
- 豆瓣(
douban) http://pypi.douban.com/simple/ - 清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
- 中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
💡pip install scrapy -i https://pypi.tuna.tsinghua.edu.cn/simple
2. 安装PyCharm
-
下载链接🔗
https://www.jetbrains.com/zh-cn/pycharm/download/#section=mac -
创建工程
New Project -> Add Interpreter -> Add Local Interpreter -
简单实例
-
创建文件,并输入:
print("Hello World!") -
右键
Run,应输出:Hello World!
-
3. 安装JupyterLab
-
安装
pippython3 -m ensurepip curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python3 get-pip.py pip -v -
安装
JupyterLabpip install jupyterlab
4. 开发准备
-
设置环境变量
export OPENAI_API_KEY='api-key' -
克隆
OpenAI快速入门存储库git clone https://github.com/DjangoPeng/openai-quickstart.git -
启动
Jupyter Labcd openai-quickstart jupyter lab -
安装依赖包
pip install tiktoken openai pandas matplotlib plotly scikit-learn numpy Embedding模型关键参数
https://platform.openai.com/docs/guides/embeddings/what-are-embeddings
