python openai official library (using AutoGPT, langchain, etc.)
API Integration Example Code#
Method 2: Environment variable configuration#
If method 1 does not work, you can try this method
The following environment variables need to be set:Note: If it does not work after modifying environment variables, please restart the system
Method 3: Use the OpenAI client#
Modified at 2026-09-23 08:28:57