Information processing device, information processing method, and program
An information processing device with generation AI capabilities simplifies API usage by generating request data from manifest information, addressing the challenge of varying API requirements and user information needs.
Patent Information
- Application Number
- JP2024047358
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-03-22
- Publication Date
- 2025-10-03
AI Technical Summary
The difficulty in using APIs due to the need to generate appropriate request data that includes information specific to each API, which is not easily achievable without knowing the necessary information for the target API.
An information processing device that utilizes a generation AI to generate request data for APIs by acquiring and processing manifest data written in natural language, allowing the device to identify and communicate with the appropriate API without prior knowledge of the required information.
Facilitates the use of APIs by generating request data through a generation AI, enabling seamless interaction with APIs regardless of the specific information requirements, even when multiple APIs are involved or different types of user-desired information are requested.
Smart Images

Figure 2025146526000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to an information processing device, an information processing method, and a program. [Background technology]
[0002] Conventionally, various companies have provided APIs (Application Programming Interfaces). For example, Patent Document 1 discloses an API processing method having a terminal that executes a plurality of API call processes defined in a program, and a plurality of server devices that run programs written in a second format to execute processes corresponding to the plurality of API call processes in response to the plurality of API call processes. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Publication No. 2019-179383 Summary of the Invention [Problem to be solved by the invention]
[0004] However, in order to use a target API, it is necessary to send a request for that API to the API server that provides that API. The information required for an API request is determined for each API and therefore differs for each API. Therefore, it is necessary to generate appropriate API request data that includes the information necessary to execute the API, but to do so, it is necessary to know the information necessary to execute the target API and generate the appropriate request data, which poses a problem that makes it difficult to use.
[0005] The present invention has been made in view of the above-mentioned problems, and has an object to provide an information processing device, an information processing method, and a program that enable easy use of a target API. [Means for solving the problem]
[0006] An information processing device according to a first aspect of the present invention includes: An information processing device capable of exchanging information with at least one API server that provides at least one function via an API and a generation AI information processing device that executes the generation AI, at least one processor; The at least one processor: A procedure for acquiring manifest data in which information for use by a generation AI of a target API included in the API provided by the API server is written in natural language; When the manifest data is acquired, a procedure of requesting the generation AI information processing device to generate request data for the target API and transmitting the manifest data or data based on the manifest data to the generation AI information processing device; receiving request data for the target API generated by the generation AI information processing device in response to a request; Execute.
[0007] With this configuration, the information processing device can obtain request data for the target API generated by the generation AI information processing device without knowing the information necessary to execute the API. This allows the target API to be used by sending this request data to the target API, making it easier to use the target API.
[0008] An information processing device according to a second aspect of the present invention is the information processing device according to the first aspect, The API server provides a plurality of APIs, The target API is an API that outputs user desired information, The at least one processor: further performing a procedure for acquiring user desired information; In the sending procedure, when requesting the generation AI information processing device to generate request data for the target API, the generation AI information processing device is requested to identify an API that outputs the user's desired information from multiple APIs provided by the API server and generate request data for the identified API.
[0009] With this configuration, the generation AI information processing device can identify an API that outputs user-desired information from multiple APIs provided by the API server and generate request data for the identified API. This allows for the generation of request data for an appropriate API according to the user-desired information when multiple APIs are provided by a single API server, resulting in a response containing the user-desired information. Therefore, even if the user-desired information differs each time, the generation AI can identify the API that outputs the user-desired information, allowing the appropriate API to be selected. Furthermore, even if the information to be sent in a request differs for each of the multiple APIs, the generation AI generates request data according to the API that outputs the user-desired information, facilitating the use of the API that outputs the user-desired information.
[0010] An information processing device according to a third aspect of the present invention is the information processing device according to the first or second aspect, the at least one API server is a plurality of API servers that provide different types of information; The at least one processor is capable of referencing a storage device that stores API information relating to at least one function provided by each of the API servers via an API and a storage location of manifest data in which information for the generation AI to use the API is written in natural language, in association with each other; The at least one processor: further executing a procedure of referring to the storage device and extracting API information from the at least one API information item in accordance with the user desired information; In the step of acquiring the manifest data, the manifest data is acquired by referencing a storage location of the manifest data associated with the extracted API information.
[0011] According to this configuration, by extracting API information according to the user desired information, it is possible to obtain manifest data containing information about an appropriate API according to the user desired information, thereby making it easier to generate request data to an appropriate API for different types of user desired information.
[0012] An information processing device according to a fourth aspect of the present invention is the information processing device according to the third aspect, The API information is a description of the functionality of the API, When extracting the API information, the at least one processor vectorizes the user desired information, and based on a comparison between the vectorized vector and a vector of a description of the function of the at least one API, searches for a description corresponding to the user desired information from among the descriptions of the function of the at least one API, thereby extracting the API information corresponding to the user desired information.
[0013] According to this configuration, it is possible to extract appropriate API information corresponding to the user desired information.
[0014] An information processing device according to a fifth aspect of the present invention is the information processing device according to any one of the first to fourth aspects, When the at least one processor receives the request data from the generation AI information processing device, it transmits the request data to the corresponding API server, receives a response transmitted from the API server in response to the request data, transmits the response to the generation AI information processing device, and requests the generation AI information processing device to extract user desired information from the response; When the generation AI information processing device receives the response from the information processing device, it is configured to extract user desired information from the response and transmit the extracted user desired information to the information processing device.
[0015] According to this configuration, since the user desired information is extracted from an appropriate API response for different types of user desired information, it is possible to acquire appropriate user desired information for different types of user desired information.
[0016] An information processing device according to a sixth aspect of the present invention is the information processing device according to any one of the first to fifth aspects, If there are multiple answer candidates in the response, the at least one processor generates a question corresponding to the answer candidate and outputs information for presenting the question to the user, and sends the user's answer to the question along with the response to the generation AI information processing device, requesting the generation AI information processing device to output one answer from the multiple answer candidates.
[0017] According to this configuration, even if there are multiple answer candidates in the response, one answer can be obtained from the multiple answer candidates as the user desired information.
[0018] An information processing device according to a seventh aspect of the present invention is the information processing device according to any one of the first to sixth aspects, If the API server executes the API according to the request data and the API does not output an error, the at least one processor stores the request data generated by the generation AI in a storage device, and if the API server executes the API according to the request data and the API outputs an error, the at least one processor sends information regarding the content of the error to the generation AI information processing device and requests the generation AI information processing device to regenerate request data for executing the API based on the content of the error.
[0019] With this configuration, if the API outputs an error once, the request data is regenerated based on the content of the error, thereby improving the possibility of obtaining an appropriate response without outputting an error thereafter.
[0020] An information processing device according to an eighth aspect of the present invention is the information processing device according to any one of the first to seventh aspects, The data based on the manifest data is data obtained by converting the manifest data into a format according to the generation AI executed by the generation AI information processing device, When the at least one processor sends data based on the manifest data to the generation AI information processing device in the procedure of sending to the generation AI information processing device, it converts the manifest data into a format corresponding to the generation AI executed by the generation AI information processing device, and sends the converted manifest data to the generation AI information processing device as data based on the manifest data.
[0021] According to this configuration, manifest data according to the generation AI can be transmitted to the generation AI information processing device.
[0022] An information processing device according to a ninth aspect of the present invention is the information processing device according to the eighth aspect, the at least one processor accepts a generation AI selected by a user from among a plurality of generation AIs; When data based on the manifest data is sent to the generation AI information processing device, the manifest data is converted into a format corresponding to the generation AI selected by the user, and the converted manifest data is sent to the generation AI information processing device as data based on the manifest data.
[0023] According to this configuration, manifest data according to the generation AI selected by the user can be transmitted to the generation AI information processing device.
[0024] An information processing device according to a tenth aspect of the present invention is the information processing device according to any one of the first to ninth aspects, The manifest data includes a description of the API's functionality written in natural language and information required to request the API.
[0025] An information processing device according to an eleventh aspect of the present invention is the information processing device according to the tenth aspect, The information required for the API request includes the address of the API to which the API request is to be sent, an HTTP method specifying the purpose and operation of the request, and parameters to be passed to the API.
[0026] An information processing method according to a twelfth aspect of the present invention comprises: An information processing method executed by an information processing device capable of exchanging information with a plurality of API servers that provide at least one function via an API and a generation AI information processing device that executes a generation AI, A procedure for acquiring manifest data in which information for use by a generation AI of a target API included in the API provided by the API server is written in natural language; When the manifest data is acquired, a procedure of requesting the generation AI information processing device to generate request data for the target API and transmitting the manifest data or data based on the manifest data to the generation AI information processing device; receiving request data for the target API generated by the generation AI information processing device in response to a request; It has.
[0027] A program according to a thirteenth aspect of the present invention comprises: A computer capable of exchanging information with a plurality of API servers that provide at least one function via an API and a generation AI information processing device that executes the generation AI, A procedure for acquiring manifest data in which information for use by a generation AI of a target API included in the API provided by the API server is written in natural language; When the manifest data is acquired, a procedure of requesting the generation AI information processing device to generate request data for the target API and transmitting the manifest data or data based on the manifest data to the generation AI information processing device; receiving request data for the target API generated by the generation AI information processing device in response to a request; This is a program for executing the above. [Effects of the Invention]
[0028] According to one aspect of the present invention, a generation AI information processing device can generate and acquire request data for a target API without knowing the information required to execute the API. This allows the target API to be used by sending this request data to the target API, thereby facilitating the use of the target API. [Brief explanation of the drawings]
[0029] [Figure 1] 1 is a schematic configuration diagram of an information processing system according to a first embodiment. [Figure 2] FIG. 2 is a diagram illustrating an example of a schematic configuration of an information processing device according to each embodiment. [Figure 3] FIG. 2 is a diagram illustrating an example of a schematic configuration of an API server according to each embodiment. [Figure 4] 4 is a diagram illustrating an example of the contents of manifest data according to the first embodiment. [Figure 5] This is an example of the contents of API request data generated by the generation AI. [Figure 6] This is an example of the response content of the stock price acquisition API. [Figure 7] 4 is a flowchart showing an example of a processing flow in the first embodiment. [Figure 8] 10 is a diagram illustrating an example of the contents of manifest data according to the second embodiment. [Figure 9]10 is a flowchart showing an example of a processing flow in the second embodiment. [Figure 10] FIG. 10 is a schematic configuration diagram of an information processing system according to a third embodiment. [Figure 11] 13 is an example of a table stored in a storage device of an information processing device according to the third embodiment. [Figure 12] 10 is a flowchart showing an example of a processing flow in the third embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0030] Each embodiment will be described below with reference to the drawings. However, more detailed explanation than necessary may be omitted. For example, detailed explanation of already well-known matters or redundant explanation of substantially identical configurations may be omitted. This is to avoid unnecessary redundancy in the following explanation and to facilitate understanding by those skilled in the art. In each embodiment below, the generation AI information processing device that provides generation AI (Artificial Intelligence) will be described as a generation AI server, as an example.
[0031] First Embodiment In the first embodiment, as an example, information desired by a user (hereinafter referred to as user desired information) is predetermined, and in the present embodiment, the user desired information is explained as the stock price of a target company, as an example.
[0032] Fig. 1 is a schematic configuration diagram of an information processing system according to the first embodiment. As shown in Fig. 1, the information processing system S according to the first embodiment includes, as an example, terminals 1-1 to 1-N (N is a natural number), an information processing device 2 connected to each of the terminals 1-1 to 1-N via a communication network CN, an API server 3 connected to the information processing device 2 via the communication network CN, and a generation AI server 4 connected to the information processing device 2 via the communication network CN.
[0033] In this embodiment, for the sake of simplicity, the information processing system S is described as having one API server as an example, but may have multiple API servers.
[0034] Terminals 1-1 to 1-N are used by different users and are, for example, mobile phones such as multi-function mobile phones (so-called smartphones), tablets, notebook computers, desktop computers, etc. Hereinafter, terminals 1-1 to 1-N will also be collectively referred to as terminal 1.
[0035] The information processing device 2 is used by, for example, an administrator who manages the information processing system S according to this embodiment, and is, for example, a server. The information processing device 2 provides information in response to a request from a terminal 1-i (i is an index and is an integer from 1 to N). The information processing device 2 may be a single computer or may be composed of multiple computers.
[0036] The API server 3 provides at least one function via an API. Here, as an example, the API server 3 will be described as providing a stock price acquisition API that provides stock prices.
[0037] The generation AI server 4 executes a generation AI (specifically, a text generation AI) to generate and output request data to the target API based on the manifest data. Here, the generation AI is, for example, an AI that outputs text data in response to input data, such as ChatGPT (registered trademark).
[0038] Fig. 2 is an example of a schematic configuration diagram of an information processing device in each embodiment. As shown in Fig. 2, the information processing device 2 includes, as an example, an input interface 21, a communication module 22, a storage device 23, a memory 24, an output interface 25, and a processor 26. Note that, in this embodiment, the information processing device 2 is described as including one processor 26, but is not limited to this, and may include multiple processors, as long as it includes at least one processor.
[0039] The input interface 21 receives an input from a manager of the information processing device 2 (for example, an employee of a management organization), and outputs an input signal to the processor 26 in accordance with the received input. The communication module 22 is connected to the communication network CN and communicates with the terminals 1-1 to 1-N, the API server 3, and the generation AI server 4. This communication may be wired or wireless, but the following description will assume that it is wired.
[0040] The storage device 23 stores programs and various data that the processor 26 reads and executes. The memory 24 temporarily stores data and programs and is a volatile memory, such as a random access memory (RAM). The output interface 25 can be connected to an external device and can output a signal to the external device.
[0041] The processor 26 loads a program from the storage device 23 into the memory 24 and executes a series of instructions contained in the program.
[0042] 3 is a schematic diagram illustrating an example of the configuration of an API server according to each embodiment. As shown in FIG. 3, the API server 3 includes an input interface 31, a communication module 32, a storage device 33, a memory 34, an output interface 35, and a processor 36. The input interface 31 receives an input from the administrator of the API server 3, and outputs an input signal corresponding to the received input to the processor . The communication module 32 is connected to the communication network CN and communicates with the information processing device 2. This communication may be wired or wireless, but the following description will be given assuming that it is wired.
[0043] The storage device 33 stores programs and various data to be read and executed by the processor 36. The storage device 33 also stores manifest data, which describes in natural language information for the generation AI to use the target API. The memory 34 temporarily stores data and programs and is a volatile memory, such as a RAM (Random Access Memory). The output interface 35 can be connected to an external device and can output a signal to the external device.
[0044] The processor 36 loads a program from the storage device 33 into the memory 34 and executes a series of instructions contained in the program.
[0045] The manifest data describes in natural language information for the generation AI to use a target API included in the API provided by the API server. Note that the manifest data may describe in natural language information for the generation AI to use not only one API but also multiple APIs. In this embodiment, as an example, the description will be given assuming that information for only one target API is described in natural language for the generation AI to use that target API.
[0046] For example, the manifest data includes a description of the API's functions written in natural language (e.g., an overview of the API) and information required for requesting the API, including the address of the API to which the request is to be sent, the HTTP method (e.g., GET or POST) specifying the purpose and operation of the request, and parameters to be passed to the API.
[0047] Fig. 4 shows an example of the contents of manifest data in the first embodiment. As shown in Fig. 4, the manifest data includes, for example, the name of the target API, an overview of the API, an HTTP method (hereinafter simply referred to as the method), a URL that is the address of the API, and parameters to be passed to the API. Here, the overview is text (e.g., a sentence) written in natural language that explains the function of the API. In the example in Figure 4, the manifest data contains information about one API, namely, the stock price acquisition API. The information about the stock price acquisition API includes the API name as "Stock Price Acquisition API," the API summary as "Acquires stock prices of a specified company," and the parameters included in the manifest data are the company code, which is a code that identifies the company, the date for which stock prices are to be acquired, and the period for which stock prices are to be acquired. The manifest data describes the name, summary, type, and whether or not the parameter is required for each parameter.
[0048] Figure 5 shows an example of the contents of API request data generated by the generation AI. In the example of Figure 5, request data is written for executing a stock price acquisition API on API server 3. The request data includes the name, summary, URL, and parameters according to the rules described in the manifest data. In the example of request data in Figure 5, the name, summary, URL, and parameters are written according to the rules described in the manifest data in Figure 4.
[0049] Figure 6 shows an example of the content of a stock price acquisition API response. This response is obtained by executing the stock price acquisition API.
[0050] Fig. 7 is a flowchart showing an example of the processing flow in the first embodiment. In the example of Fig. 6, request data of a stock price acquisition API is saved in advance. As a result, when the information processing device 2 receives a request to acquire the stock price of a certain target company from a terminal, it can acquire the stock price of the target company by updating the company code in the request data to the company code of the target company.
[0051] (Step S211) The information processing device 2 requests manifest data from the API server 3 that provides the target API (specifically, the stock price acquisition API here).
[0052] (Step S311) Next, the API server 3 transmits manifest data to the information processing device 2 in response to a request from the information processing device 2.
[0053] (Step S212) Next, when the information processing device 2 receives the manifest data, it transmits the received manifest data to the generation AI server 4 and requests that request data be generated for the target API (specifically, the stock price acquisition API in this case).
[0054] (Step S411) Next, in response to a request from the information processing device 2, the generation AI server 4 generates request data for the target API (specifically, a stock price acquisition API in this case) based on the manifest data.
[0055] (Step S412) Next, the generation AI server 4 transmits the generated request data to the information processing device 2.
[0056] (Step S213) When the information processing device 2 receives the request data, it stores the request data in the storage device 23.
[0057] Below, we will explain the process when the user subsequently selects Company X as an example of a target company and requests to acquire Company X's stock price. (Step S111) The terminal 1-i receives a request for the stock price of X company.
[0058] (Step S112) Next, the terminal 1-i transmits a request for the stock price of Company X to the information processing device 2.
[0059] (Step S214) When the information processing device 2 receives this request for Company X's stock price, it reads the request data from the storage device 23 and updates the company code in the request data to the company code of Company X. If the company code for each company is pre-stored in the storage device 23, the information processing device 2 may obtain the company code of Company X by referring to the storage device 23. Alternatively, the information processing device 2 may obtain the company code by accessing a web page that lists the company code for each company, or may obtain the company code by making a request to the generation AI server 4.
[0060] (Step S215) Next, the information processing device 2 transmits the request data updated to the company code of Company X to the API server 3.
[0061] (Step S312) When the API server 3 receives the updated request data from the information processing device 2, it executes the target API (specifically, the stock price acquisition API) according to the updated request data and sends a response to the information processing device 2.
[0062] (Step S216) Next, when the information processing device 2 receives a response from the API server 3, it extracts Company X's stock price information (for example, the closing price of Company X on the day the user's desired information was received) from the response, and transmits the extracted Company X's stock price information to the terminal 1-i that requested the stock price.
[0063] (Step S113) Next, when the terminal 1 receives this stock price information of Company X, it presents the stock price information of Company X (for example, displays or outputs the information as audio).
[0064] As described above, the information processing device 2 according to the first embodiment is an information processing device that can communicate with at least one API server that provides at least one function via an API and a generation AI server that executes a generation AI. The information processing device 2 has at least one processor, which executes the following steps: acquiring manifest data in which information for the generation AI to use the target API included in the API provided by the API server 3 is written in natural language; when the manifest data is acquired, requesting the generation AI server to generate request data for the target API and transmitting the manifest data or data based on the manifest data to the generation AI server; and receiving the request data for the target API generated by the generation AI server in response to the request.
[0065] With this configuration, the information processing device can obtain request data for the target API generated by the generation AI server without knowing the information necessary to execute the API. This allows the target API to be used by sending this request data to the target API, making it easier to use the target API.
[0066] As an example in this embodiment, the information processing device 2 extracts the stock price information of Company X, which is the user-desired information, from the response output by the API server 3. However, this is not limited to this, and the generation AI server 4 may extract the stock price information of Company X, which is the user-desired information, from the response output by the API server 3.
[0067] <Second embodiment> In the first embodiment, the user-desired information was described as the stock price of Company X, as an example. However, the user-desired information is not necessarily the same each time. For example, a user who wants to trade securities may want to know stock prices, search for listed companies, or know sales rankings. To accommodate these different user-desired information, in the second embodiment, one API server provides multiple APIs. In this embodiment, as an example, the API server 3 provides information related to stock trading, and is described as providing, for example, not only a stock price acquisition API that provides stock prices, but also a listed company search API that searches for listed companies and a sales ranking acquisition API that provides sales rankings. In this case, because the information to be sent in the request differs for each API, it is not easy to generate request data, which poses a problem of making it difficult to use the target API.
[0068] The configuration of the information processing system according to the second embodiment is similar to the configuration of the information processing system according to the first embodiment shown in FIG. 1, and therefore a description thereof will be omitted.
[0069] Fig. 8 shows an example of the contents of manifest data in the second embodiment. As shown in Fig. 4, the manifest data includes, for each API, the name of the API, an overview of the API, an HTTP method, a URL that is the address of the API, and parameters to be passed to the API. Here, the overview is text (e.g., a sentence) written in natural language that explains the function of the API. In the example of Fig. 8, the manifest data includes information on three APIs. Specifically, it includes information on a stock price acquisition API, a listed company search API, and a sales ranking acquisition API.
[0070] 9 is a flowchart showing an example of the processing flow in the second embodiment. In the example of FIG. 9, when the information processing device 2 receives user desired information from the terminal 1-i, it requests the generation AI server 4 to identify an API that outputs the user desired information and generate request data for the identified API. As a result, the information processing device 2 can obtain a response including the user desired information by transmitting the generated request data to the API server 3.
[0071] (Step S121) The terminal 1-i receives user-desired information (for example, stock price of Company X).
[0072] (Step S122) Next, the terminal 1-i transmits the user desired information to the information processing device 2.
[0073] (Step S221) When the information processing device 2 receives this user desired information, it requests manifest data from the API server 3 that provides an API for outputting the user desired information.
[0074] (Step S321) Next, the API server 3 transmits manifest data to the information processing device 2 in response to a request from the information processing device 2.
[0075] (Step S222) Next, when the information processing device 2 receives manifest data, it transmits the received manifest data to the generation AI server 4 and requests that it identify the API that outputs the user-desired information and generate request data for the identified API.
[0076] (Step S421) Next, in response to a request from the information processing device 2, the generation AI server 4 identifies an API that outputs the user's desired information from among the multiple APIs listed in the manifest data, and generates request data for the identified API.
[0077] (Step S422) Next, the generation AI server 4 transmits the generated request data to the information processing device 2.
[0078] (Step S223) Next, when the information processing device 2 receives the request data from the generation AI server 4, it transmits the request data to the API server 3.
[0079] (Step S322) Next, when the API server 3 receives request data from the information processing device 2, it executes an API (specifically, in this case, for example, a stock price acquisition API) that outputs the user's desired information in accordance with the request data, and sends a response to the information processing device 2.
[0080] (Step S224) Next, when the information processing device 2 receives a response from the API server 3, it extracts the user desired information (for example, stock price information of Company X) from this response. For example, if the user desired information is stock price information of Company X, the information processing device 2 extracts the stock price information of Company X from this response (for example, the closing price of Company X on the day the user desired information was received).
[0081] (Step S225) When the information processing device 2 receives the user desired information from the generation AI server 4, it transmits this user desired information to the terminal 1.
[0082] (Step S123) Next, when the terminal 1 receives this user desired information, it presents the user desired information (for example, by displaying or outputting the information as audio). For example, if the user desired information is the stock price of Company X, the terminal 1 presents the stock price of Company X.
[0083] As described above, in the second embodiment, the API server 3 provides multiple APIs, and the target API is an API that outputs user-requested information. At least one processor further executes a procedure for acquiring the user-requested information. Furthermore, when requesting the generation AI server 4 to generate request data for the target API in the sending procedure, the at least one processor identifies an API that outputs the user-requested information from the multiple APIs provided by the API server 3 and requests the generation AI server to generate request data for the identified API.
[0084] With this configuration, the generation AI server 4 can identify an API that outputs user-desired information from among the multiple APIs provided by the API server 3 and generate request data for the identified API. This allows for the generation of request data for an appropriate API according to the user-desired information when multiple APIs are provided by a single API server, resulting in a response including the user-desired information. Therefore, even if the user-desired information differs each time, the generation AI can identify the API that outputs the user-desired information, allowing the appropriate API to be selected. Furthermore, even if the information to be sent in a request differs for each of the multiple APIs, the generation AI generates request data according to the API that outputs the user-desired information, facilitating the use of the API that outputs the user-desired information.
[0085] In this embodiment, as an example, the information processing device 2 extracts the user desired information from the response output by the API server 3, but this is not limited to this, and the generation AI server 4 may also extract the user desired information from the response output by the API server 3.
[0086] <Third embodiment> In the second embodiment, API server 3 provides a specific type of information (e.g., information about stock trading) and multiple APIs. In this case, users are restricted to obtaining only a specific type of information. However, even for a single user, the user-desired information does not depend on a specific type of information; the type of information desired varies from user to user, and the type of user-desired information varies for each of multiple users. For example, a user may want information about stock trading, or may want to find a desired product, or may want to find a restaurant, or may want to find a delicious cooking recipe. Since it is not easy to select an appropriate API for such different types of user-desired information, there is a further problem in that it is not easy to generate request data to an appropriate API for each different type of user-desired information.
[0087] Therefore, the information processing system of the third embodiment is equipped with multiple API servers that provide different types of information, and the information processing device 2 identifies the API server that provides the API corresponding to the user's desired information and requests manifest data from that API server.
[0088] Fig. 10 is a schematic configuration diagram of an information processing system according to the third embodiment. Compared to the information processing system S according to the first embodiment in Fig. 1, the information processing system S3 according to the first embodiment is different in that it includes multiple API servers 3-1, ..., 3-M (M is a natural number) that provide different types of information. A storage device accessible to the processor 26 of the information processing device 2 stores API information relating to at least one function provided by each API server via an API, and a storage location (e.g., a URL address) of manifest data in which information for the generation AI to use the API is written in natural language, in association with each other. Here, this storage device is described as an example using the storage device 23 of the information processing device. Here, the API information is a description of the API function, such as an overview of each API.
[0089] 11 shows an example of a table stored in a storage device of an information processing device according to the third embodiment. Table T1 stores information about manifest data for each API server. Specifically, table T1 stores, for example, a set of an ID, which is identification information for identifying the manifest data, the name of the company providing the API, an overview of the API service, an overview of each API, which is an example of API information, and a URL address, which is an example of a storage location for the manifest data.
[0090] FIG. 12 is a flowchart showing an example of the flow of processing in the third embodiment.
[0091] (Step S131) The terminal 1-i receives user-desired information (for example, stock price of Company X).
[0092] (Step S132) Next, the terminal 1-i transmits the user desired information to the information processing device 2.
[0093] (Step S231) The processor 26 of the information processing device 2 extracts API information from a plurality of pieces of API information according to the user desired information. Specifically, for example, when extracting API information, the processor 26 of the information processing device 2 vectorizes the user desired information, and based on a comparison between the vectorized vector and a vector of a description of the function of the at least one API (for example, an overview of each API), searches for a description corresponding to the user desired information from among the descriptions of the function of the at least one API, thereby extracting API information corresponding to the user desired information. This makes it possible to extract appropriate API information corresponding to the user desired information.
[0094] Next, processor 26 of information processing device 2 acquires the manifest data by referring to the storage location of the manifest data associated with the extracted API information. As an example, processor 26 of information processing device 2 acquires the manifest data by making a request to the API server at the address of the manifest data associated with the extracted API information. Specifically, the manifest data is acquired by, for example, the following steps S232 and S321.
[0095] (Step S232) The information processing device 2 requests manifest data from the API server 3-j (j is an index and is an integer from 1 to M) at the address of the manifest data associated with the extracted API information.
[0096] (Step S321) Next, the API server 3-j transmits manifest data to the information processing device 2 in response to a request from the information processing device 2.
[0097] (Step S233) Next, when the information processing device 2 receives manifest data, it transmits the received manifest data to the generation AI server 4 and requests that it identify the API that outputs the user-desired information and generate request data for the identified API.
[0098] (Step S431) Next, in response to a request from the information processing device 2, the generation AI server 4 identifies an API that outputs the user-desired information from among the multiple APIs listed in the manifest data, and generates request data for the identified API.
[0099] (Step S432) Next, the generation AI server 4 transmits the generated request data to the information processing device 2.
[0100] (Step S234) Next, when the information processing device 2 receives request data from the generation AI server 4, it transmits the request data to the API server 3-j.
[0101] (Step S332) Next, when the API server 3-j receives request data from the information processing device 2, it executes an API (specifically, in this case, for example, a stock price acquisition API) that outputs the user's desired information in accordance with the request data, and sends a response to the information processing device 2.
[0102] (Step S235) Next, the information processing device 2 transmits the response to the generation AI server 4, and requests the generation AI server 4 to extract the user's desired information (for example, stock price information of Company X) from the response.
[0103] (Step S432) Next, in response to the request from the information processing device 2, the generation AI server 4 extracts the user desired information (for example, stock price information of Company X) from the response.
[0104] (Step S433) Next, the generation AI server 4 transmits the extracted user desired information to the information processing device 2. If the user desired information is, for example, stock price information for Company X, the generation AI server 4 transmits information such as "The current stock price of Company X is 1,050 yen" to the information processing device 2.
[0105] (Step S225) Next, when the information processing device 2 receives user desired information from the generation AI server 4, for example, it converts this user desired information into output information to be presented to the user in accordance with a predetermined output format. Here, the predetermined output format is, for example, closing price: [closing price amount]. For example, if the user desired information received from the generation AI server 4 is "The current stock price of Company X is 1,050 yen," the output information is "closing price: 1,050 yen."
[0106] (Step S225) Next, the information processing device 2 transmits the converted output information to the terminal 1.
[0107] (Step S123) Next, when the terminal 1 receives this output information, it presents the output information (for example, displays or outputs it as sound).
[0108] The information processing device 2 may transmit the user desired information as is without converting it into output information.
[0109] As described above, in the third embodiment, at least one API server is a plurality of API servers 3-j that provide different types of information. At least one processor of the information processing device 2 can reference a storage device that stores, in association with each other, API information related to at least one function provided by each API server 3-j via an API and the location of manifest data in which information for the generation AI to use the API is written in natural language. At least one processor of the information processing device 2 further executes a procedure of extracting API information from the at least one API information according to the user desired information by referring to the storage device, and in the procedure of acquiring the manifest data, acquires the manifest data by referring to the storage location of the manifest data associated with the extracted API information.
[0110] With this configuration, by extracting API information according to the user-desired information, it is possible to obtain manifest data containing information about the appropriate API according to the user-desired information, thereby making it easier to generate request data to the appropriate API for different types of user-desired information.
[0111] Furthermore, in the third embodiment, when at least one processor of the information processing device 2 receives the request data from the generation AI server 4, it sends the request data to the corresponding API server 3-j, receives a response sent from the API server 3-j in response to the request data, sends the response to the generation AI server 4, and requests the generation AI server 4 to extract user-desired information from the response.The generation AI server 4 is configured, when it receives the response from the information processing device 2, to extract the user-desired information from the response and send the extracted user-desired information to the information processing device 2.
[0112] According to this configuration, since the user desired information is extracted from an appropriate API response for different types of user desired information, it is possible to acquire appropriate user desired information for different types of user desired information.
[0113] <Modifications of each embodiment> In addition, if there are multiple answer candidates in the response, at least one processor of the information processing device 2 may generate a question corresponding to the answer candidate, output information for presenting the question to the user, and request the generation AI server 4 to send the user's answer to the question along with the response to output one answer from the multiple answer candidates. In this way, even if there are multiple answer candidates in the response, one answer from the multiple answer candidates can be obtained as the user's desired information.
[0114] Furthermore, if the API server executes the API according to the request data and the API does not output an error, at least one processor of the information processing device 2 may store the request data generated by the generation AI in the storage device 23. With this configuration, only appropriate request data for which the API did not output an error is stored. On the other hand, if the API outputs an error as a result of the API server executing the API according to the request data, at least one processor of the information processing device 2 may send information regarding the content of the error (e.g., data on all or part of the error text) to the generation AI server and request the generation AI server 4 to regenerate request data for executing the API based on the content of the error. In this case, at least one processor of the information processing device 2 may further request the generation AI server 4 to send the regenerated request data to the corresponding API server so that the API can execute it. With this configuration, if the API outputs an error once, the request data is regenerated based on the content of the error, thereby improving the possibility of obtaining an appropriate response without outputting an error thereafter.
[0115] <Modifications of output information in each embodiment> In each embodiment, when at least one processor of the information processing device 2 receives extracted user desired information from the generation AI server 4, it may convert some or all of the received information into an image and output data including the obtained image as output information to present to the user.
[0116] In each embodiment, manifest data is transmitted to the generation AI server, but this is not limited thereto. Data based on the manifest data may also be transmitted to the generation AI server. Here, the data based on the manifest data may be data obtained by converting the manifest data into a format appropriate for the generation AI executed by the generation AI server 4. In this case, when transmitting data based on the manifest data to the generation AI server, at least one processor of the information processing device may convert the manifest data into a format appropriate for the generation AI executed by the generation AI server in the procedure for transmitting the data to the generation AI information processing device, and transmit the converted manifest data to the generation AI server as data based on the manifest data. This configuration makes it possible to transmit manifest data appropriate for the generation AI to the generation AI server.
[0117] In each embodiment, the user may select a generation AI (for example, Chat GPT) by operating the terminal. In this case, the terminal 1 transmits the generation AI selected by the user to the information processing device 2, and the information processing device 2 communicates with a generation AI server that executes the generation AI. In this case, at least one processor of the information processing device 2 accepts a generation AI selected by a user from among multiple generation AIs. Furthermore, in this case, when transmitting data based on manifest data to the generation AI server, the manifest data may be converted into a format corresponding to the generation AI selected by the user, and the converted manifest data may be transmitted to the generation AI server as data based on the manifest data. This configuration allows manifest data corresponding to the generation AI selected by the user to be transmitted to the generation AI server.
[0118] In each embodiment, the generation AI information processing device has been described as the generation AI server 4 as an example, but this is not limited to this, and the generation AI information processing device may be implemented within the information processing device 2, may be externally connected to the information processing device 2 via electrical wiring, or may be implemented within the terminal 1. In any case, the generation AI information processing device must be able to exchange information with the information processing device 2. In each embodiment, the user desired information is obtained by a single exchange of information with the terminal 1, but the present invention is not limited to this and may be obtained by multiple exchanges of information.
[0119] At least a part of the information processing device 2 described in the above embodiment may be configured with hardware or software. If configured with software, a program that realizes at least a part of the functions of the information processing device 2 may be stored in a computer-readable recording medium and read and executed by a computer. The recording medium is not limited to removable media such as magnetic disks and optical disks, but may also be fixed recording media such as hard disk drives and memories.
[0120] In addition, a program that realizes at least a part of the functions of the information processing device 2 may be distributed via a communication line (including wireless communication) such as the Internet. Furthermore, the program may be encrypted, modulated, or compressed and distributed via a wired line or wireless line such as the Internet, or stored on a recording medium.
[0121] Furthermore, the information processing device 2 may be functioned by one or more information devices. When multiple information devices are used, one of the devices may be a computer, and the computer may execute a predetermined program to realize the functions of at least one means of the information processing device 2.
[0122] In the method invention, all processes (steps) may be realized by automatic control using a computer. Alternatively, each process may be performed by a computer, with progress control between processes being performed manually. Furthermore, at least some of the processes may be performed manually.
[0123] As described above, the present invention is not limited to the above-described embodiments, and the components can be modified and embodied in practice without departing from the spirit of the invention. Furthermore, various inventions can be formed by appropriately combining multiple components disclosed in the above-described embodiments. For example, some components may be omitted from all the components shown in the embodiments. Furthermore, components from different embodiments may be appropriately combined. [Explanation of symbols]
[0124] 1-1, ..., 1-N terminals 2. Information processing equipment 21 Input Interface 22 Communication Module 23 Storage device 24 memory 25 Output Interface 26 processors 3. API Server 31 Input Interface 32 Communication Module 33 Storage device 34 memory 35 Output Interface 36 processors S, S3 Information Processing System
Claims
1. An information processing device capable of exchanging information with at least one API server that provides at least one function via an API and a generation AI information processing device that executes the generation AI, at least one processor; The at least one processor: A procedure for acquiring manifest data in which information for a generation AI to use a target API included in the API provided by the API server is written in natural language; When the manifest data is acquired, a procedure of requesting the generation AI information processing device to generate request data for the target API and transmitting the manifest data or data based on the manifest data to the generation AI information processing device; A procedure for receiving request data for the target API generated by the generation AI information processing device in response to a request; Run Information processing device.
2. The API server provides a plurality of APIs, The target API is an API that outputs user desired information, The at least one processor: further performing a procedure for acquiring user desired information; When requesting the generation AI information processing device to generate request data for the target API in the sending procedure, the generation AI information processing device is requested to identify an API that outputs the user desired information from multiple APIs provided by the API server and generate request data for the identified API. The information processing device according to claim 1 .
3. the at least one API server is a plurality of API servers that provide different types of information from each other; The at least one processor is capable of referencing a storage device in which API information relating to at least one function provided by each of the API servers via an API and a storage location of manifest data in which information for the generation AI to use the API is described in natural language are associated and stored; The at least one processor: further executing a procedure of referring to the storage device and extracting API information from the at least one API information item in accordance with the user desired information; In the step of acquiring the manifest data, the manifest data is acquired by referencing a storage location of the manifest data associated with the extracted API information.
3. The information processing device according to claim 1.
4. The API information is a description of the function of the API, When extracting the API information, the at least one processor vectorizes the user desired information, and based on a comparison between the vectorized vector and a vector of a description of the function of the at least one API, searches for a description corresponding to the user desired information from among the descriptions of the function of the at least one API, thereby extracting the API information corresponding to the user desired information. The information processing device according to claim 3 .
5. When the at least one processor receives the request data from the generating AI information processing device, it transmits the request data to the corresponding API server, receives a response transmitted from the API server in response to the request data, transmits the response to the generating AI information processing device, and requests the generating AI information processing device to extract user desired information from the response; The generation AI information processing device is configured to, when receiving the response from the information processing device, extract user desired information from the response and transmit the extracted user desired information to the information processing device.
3. The information processing device according to claim 1.
6. When there are multiple answer candidates in the response, the at least one processor generates a question corresponding to the answer candidate, outputs information for presenting the question to the user, and transmits the user's answer to the question together with the response to the generation AI information processing device, and requests the generation AI information processing device to output one answer from the multiple answer candidates. The information processing device according to claim 5 .
7. The at least one processor stores the request data generated by the generation AI in a storage device when the API server executes the API according to the request data and the API does not output an error, and when the API server executes the API according to the request data and the API outputs an error, transmits information regarding the content of the error to the generation AI information processing device and requests the generation AI information processing device to regenerate request data for executing the API based on the content of the error. The information processing device according to claim 5 .
8. The data based on the manifest data is data obtained by converting the manifest data into a format according to the generation AI executed by the generation AI information processing device, When transmitting data based on the manifest data to the generation AI information processing device in the procedure of transmitting to the generation AI information processing device, the at least one processor converts the manifest data into a format corresponding to the generation AI executed by the generation AI information processing device, and transmits the converted manifest data to the generation AI information processing device as data based on the manifest data.
3. The information processing device according to claim 1.
9. The at least one processor receives a generated AI selected by a user from among a plurality of generated AIs; When transmitting data based on the manifest data to the generation AI information processing device, the manifest data is converted into a format corresponding to the generation AI selected by the user, and the converted manifest data is transmitted to the generation AI information processing device as data based on the manifest data. The information processing device according to claim 8 .
10. The manifest data includes a description of the API's functionality written in natural language and information required to request the API.
3. The information processing device according to claim 1.
11. The information required for the API request includes the address of the API to which the API request is to be sent, the HTTP method specifying the purpose and operation of the request, and parameters to be passed to the API. The information processing device according to claim 10.
12. An information processing method executed by an information processing device capable of exchanging information with a plurality of API servers that provide at least one function via an API and a generation AI information processing device that executes a generation AI, A procedure for acquiring manifest data in which information for a generation AI to use a target API included in the API provided by the API server is written in natural language; When the manifest data is acquired, a procedure of requesting the generation AI information processing device to generate request data for the target API and transmitting the manifest data or data based on the manifest data to the generation AI information processing device; A procedure for receiving request data for the target API generated by the generation AI information processing device in response to a request; An information processing method comprising:
13. A computer capable of exchanging information with a plurality of API servers that provide at least one function via an API and a generation AI information processing device that executes the generation AI, A procedure for acquiring manifest data in which information for a generation AI to use a target API included in the API provided by the API server is written in natural language; When the manifest data is acquired, a procedure of requesting the generation AI information processing device to generate request data for the target API and transmitting the manifest data or data based on the manifest data to the generation AI information processing device; A procedure for receiving request data for the target API generated by the generation AI information processing device in response to a request; A program to execute.
Citation Information
Patent Citations
API processing method, terminal, and API processing program
JP2019179383A