
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: 如何使用functools.reduce逐步縮減可迭代對象,合併為單個結果? import functools; product = functools.reduce( lambda x, y: x * y, numbers) ; reduce(function, sequence [, initial]) -> value ; map(function, iterable) ; filter(function, iterable) ; map ; filter Python: 如何使用functools.reduce逐步縮減可迭代對象,合併為單個結果? import functools; product = functools.reduce( lambda x, y: x * y, numbers) ; reduce(function, sequence [, initial]) -> value ; map(function, iterable) ; filter(function, iterable) ; map ; filter](https://i1.wp.com/savingking.com.tw/wp-content/uploads/2023/06/20230626093403_49.png?quality=90&zoom=2&ssl=1&resize=350%2C233)

![Python如何讀取*.jsonl (JSON Lines)? 讀取為List[dict] Python如何讀取*.jsonl (JSON Lines)? 讀取為List[dict]](https://i2.wp.com/savingking.com.tw/wp-content/uploads/2023/10/20231024225613_30.png?quality=90&zoom=2&ssl=1&resize=350%2C233)
![Python: pandas.Series如何只保留str,去除重複值?#isinstance(x:Any, str) -> bool #.drop_duplicates() #Series.apply( function )逐元素應用function運算 #DataFrame.apply( function )逐Series應用function運算 .drop_duplicates() 跟.unique()有何差別? df.drop_duplicates() 等效於 df[~df.duplicated()] Python: pandas.Series如何只保留str,去除重複值?#isinstance(x:Any, str) -> bool #.drop_duplicates() #Series.apply( function )逐元素應用function運算 #DataFrame.apply( function )逐Series應用function運算 .drop_duplicates() 跟.unique()有何差別? df.drop_duplicates() 等效於 df[~df.duplicated()]](https://i0.wp.com/savingking.com.tw/wp-content/uploads/2024/11/20241123194900_0_5218de.png?quality=90&zoom=2&ssl=1&resize=350%2C233)

近期留言