#API calls in CustomGPT's

1 messages · Page 1 of 1 (latest)

merry fern
#

Tell me how to implement this simple API in a custom GPT. Take a step back and think about it before you explain it to me.

Here is some additional information about the API I want to implement:

isEven API is a RESTful API that returns json.

API URL: https://api.isevenapi.xyz/api/

GET /iseven/<number>/
Returns whether a given number is even. Only numbers up to 999,999 are allowed.

URL Parameters
number: the number you want to check

Example
https://api.isevenapi.xyz/api/iseven/6/

Unofficial Python Module
https://pypi.org/project/PyIsEven/

dense juniperBOT
#

Hi @merry fern. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Hmm, I don't know enough to give you a confident answer yet. The extracts provided do not contain specific information on how to implement a custom API in a GPT model. However, they do provide some general guidance on working with the OpenAI API and creating schemas for API requests.

For instance, one extract from the OpenAI community forum provides a sample schema for a GET request. This schema could potentially be adapted to work with your isEven API. Here's the relevant part of the schema:

{
    "openapi": "3.1.0",
    "info": {
        "title": "WebdadiAPI",
        "version": "0.1.0"
    },
    "servers": [
        {
            "url": "MyFQDN/"
        }
    ],
    "paths": {
        "/search": {
            "get": {
                "summary": "Search GPT-generated content",
                "operationId": "searchGPTContent",
                "parameters": [
                    {
                        "name": "input_text",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],

You would need to replace the url under servers with your API's base URL, and adjust the paths and parameters to match your API's endpoints and parameters.

For more detailed guidance, I recommend checking out the OpenAI Cookbook (https://cookbook.openai.com/), which provides examples and tutorials on various topics related to working with OpenAI's models and APIs.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@merry fern kapa.ai is still learning and improving, please let us know how it did by reacting below

merry fern
#

@dense juniper But I don't want to use the API in the Playground. Tell me how I would implement it into a CustomGPT which definitely supports API calls.

dense juniperBOT
#

Let me check the knowledge base for you. One moment! :books:

#

Based on the information provided in the extracts, it's currently not possible to directly integrate an external API call like the isEven API into a custom GPT model via the OpenAI API. The extracts suggest that GPT models are primarily designed for use within the ChatGPT ecosystem and there are no official plans to support access to GPT’s from an API call.

However, it's mentioned that GPTs can be set to use actions to call on your own OAuth domain API to provide functionality. This suggests that you could potentially create a separate service that interacts with the isEven API and then integrate this service with your custom GPT model. But this would likely involve significant development work and may not be feasible depending on your specific requirements and constraints.

For more detailed information and potential workarounds, you may want to reach out to the OpenAI community or check the OpenAI Cookbook (https://github.com/openai/openai-cookbook/blob/main/examples/Function_calling_with_an_OpenAPI_spec.ipynb) for examples and tutorials on various topics related to working with OpenAI's models and APIs.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@merry fern kapa.ai is still learning and improving, please let us know how it did by reacting below

merry fern
#

@dense juniper liar liar pants on fire!

dense juniperBOT
#

Let me check the knowledge base for you. One moment! :books:

#

I'm sorry, but your statement doesn't seem to be a question or a request related to OpenAI's products or services. Could you please provide more context or clarify your question? I'm here to help with any inquiries you have about OpenAI's AI technologies.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: