From dc21f0a3069a3a9083d86de257754cb5daf31099 Mon Sep 17 00:00:00 2001 From: Michael Currin <18750745+MichaelCurrin@users.noreply.github.com> Date: Tue, 7 Jan 2025 09:49:02 +0100 Subject: [PATCH] Update pollinations-ai.md --- cheatsheets/artificial-intelligence/pollinations-ai.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cheatsheets/artificial-intelligence/pollinations-ai.md b/cheatsheets/artificial-intelligence/pollinations-ai.md index 1d472f5a2..3b672737e 100644 --- a/cheatsheets/artificial-intelligence/pollinations-ai.md +++ b/cheatsheets/artificial-intelligence/pollinations-ai.md @@ -57,7 +57,7 @@ The text endpoint also includes a path for an API that follows the **OpenAI** sp - `https://text.pollinations.ai/openai` -With `openai`: +With the [openai](https://pypi.org/project/openai/) package: ```python from openai import OpenAI @@ -65,15 +65,12 @@ from openai import OpenAI client = OpenAI(base_url="https://text.pollinations.ai/openai", api_key="dummy") ``` -With LangChain's [ChatOpenAI](https://python.langchain.com/docs/integrations/chat/openai/): +With the [langchain-openai](https://pypi.org/project/langchain-openai/) package and [ChatOpenAI](https://python.langchain.com/docs/integrations/chat/openai/) class: ```python from langchain_openai import ChatOpenAI -client = ChatOpenAI(ChatOpenAI( - base_url="https://text.pollinations.ai/openai", - openai_api_key="dummy", -) +client = ChatOpenAI(base_url="https://text.pollinations.ai/openai", openai_api_key="dummy") ``` ### Image endpoint