本文共 1106 字,大约阅读时间需要 3 分钟。
conda create -n langgpt python=3.10 -yconda activate langgptpip install streamlit==1.37.0 openai==1.37.1
mkdir langgptcd langgptgit clone https://github.com/sci-m-wang/Spy-Game.gitcd Spy-Game
from openai import OpenAIclientclient = OpenAI( api_key="YOUR_API_KEY", base_url="https://api.siliconflow.cn/v1")model = "internlm/internlm2_5-20b-chat"response = client.chat.completions.create( model=model, messages=[{ "role": "system", "content": "..." }], max_tokens=100)print(response.choices[0].message.content)langgpt/ who_is_the_spy.py???????requirements.txt?????README.md?????internlm2_5-20b-chat ??python -m streamlit run who_is_the_spy.py
???????????????? InternLM ??????? AI ????????
转载地址:http://ldpfk.baihongyu.com/