
code:
import openai
client = openai.OpenAI(
api_key="YOUR_POE_API_KEY", # or os.getenv("POE_API_KEY")
base_url="https://api.poe.com/v1",
)
chat = client.chat.completions.create(
model="GPT-5-Chat",
messages=[{"role": "user", "content": "Hello world"}],
)
print(chat.choices[0].message.content)實作結果:

poe為各大型語言模型(Large Language Model)的集合,
不用再煩惱那一家的語言模型比較強
通通都可以使用
可以花20美金/月 升級 (年繳有優惠),
同openAI GPT的價錢
卻可以使用openAI以外,其他家的LLM
沒有openAI API的 text-embedding-3-large
因為text-embedding 不算LLM
openAI系列:

Claude:

Gemini-2:

使用同一個api key
同樣的openAI 語法,
可以使用poe上的所有模型:

推薦hahow線上學習python: https://igrape.net/30afN



![Python: matplotlib如何控制legend的位置? ax.legend(handles=[patch], loc=’upper left’, bbox_to_anchor=(6/10, 3/5) Python: matplotlib如何控制legend的位置? ax.legend(handles=[patch], loc=’upper left’, bbox_to_anchor=(6/10, 3/5)](https://i1.wp.com/savingking.com.tw/wp-content/uploads/2023/05/20230502163945_79.png?quality=90&zoom=2&ssl=1&resize=350%2C233)
![Python四種型態增加元素 list.append(元素), tuple = tuple + (元素, ), set.add(元素), dict[key]=value Python四種型態增加元素 list.append(元素), tuple = tuple + (元素, ), set.add(元素), dict[key]=value](https://i0.wp.com/savingking.com.tw/wp-content/uploads/2022/05/20220513083711_22.png?quality=90&zoom=2&ssl=1&resize=350%2C233)

![Python提取2D array的一部份資料; import numpy; a[1: , 2:] ; a[1:-1 , 2:-1] Python提取2D array的一部份資料; import numpy; a[1: , 2:] ; a[1:-1 , 2:-1]](https://i0.wp.com/savingking.com.tw/wp-content/uploads/2022/09/20220906122441_97.png?quality=90&zoom=2&ssl=1&resize=350%2C233)
![Python TQC考題810 最大值與最小值之差,L=[eval(i) for i in s.split()] Python TQC考題810 最大值與最小值之差,L=[eval(i) for i in s.split()]](https://i0.wp.com/savingking.com.tw/wp-content/uploads/2022/05/20220507094526_36.png?quality=90&zoom=2&ssl=1&resize=350%2C233)


近期留言