Call ChatGPT
Integrate system functions with ChatGPT by calling the ChatGPT interface
Parameter Configuration
| Parameter | Description |
|---|---|
| API Address | Interface address for calling ChatGPT, can be dynamically calculated and specified using expressions |
| API Key | Interface secret key used by the API interface, can be dynamically calculated and specified using expressions |
| Timeout (seconds) | Timeout time for calling the ChatGPT interface, 0 means no timeout, wait for interface return |
| temperature | Value between 0-2, larger values make answers more random |
| top_p | Nucleus sampling, value between 0-1, 0.1 means only consider tokens that make up the top 10% probability mass |
| Maximum token count returned | Each Chinese character occupies one token, the total number of input and output tokens cannot exceed 4096 |
| presence_penalty | Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear so far in the text, increasing the likelihood that the model will talk about new topics |
| frequency_penalty | Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text, reducing the likelihood that the model will repeat the same line verbatim |
| Stop Words | Stop generation when encountering the following words, multiple stop words are separated by commas. Maximum 4, can be dynamically calculated and specified using expressions |
| Number of answers generated | Stop generation when encountering the following words, multiple stop words are separated by commas. Maximum 4, can be dynamically calculated and specified using expressions |
| Content sent | Prompt content sent to ChatGPT, can be dynamically calculated and specified using expressions |
Return Values
Notes
Api KeyCan be generated through https://platform.openai.com/account/api-keys- Api Key cannot be viewed again after generation, needs to be deleted and recreated, please keep Api Key properly
- Do not share your API key with others, or expose it in browser or other client-side code
rolefield, which aresystemrepresenting the system,userrepresenting the user, andassistantrepresenting the AI's answer- When role is ``system`` The content represents an instruction we give to AI, that is, telling AI how to answer the user's questions. For example, if we want AI to answer in Chinese, we can write "You are an assistant who only answers questions in Chinese" in content, so that even if the user's questions are all in English, the AI's replies will be in Chinese - When role is ``user`` or ``assistant`` The content represents the content of the conversation between the user and AI. Need to send the historical conversation together to OpenAI's interface so that it can understand the context of the entire conversation
Usage Scenarios
- Call OpenAI to parse data based on context content
- Call OpenAI to summarize and extract outlines based on context content
- Call OpenAI to generate formatted data for system entry based on context content

