Method and device for loading large model plug-in and storage medium

By analyzing the open interface of the big model plug-in description document and loading the general big model plug-in as a redirect plug-in, the problem of complex and inefficient large model plug-in calls in traditional systems is solved, and a simplified call process and improved efficiency are achieved.

CN119105815AActive Publication Date: 2024-12-10ZHONGKE YUNGU TECH
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411031833.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-12-10
Estimated Expiration
2044-07-30

AI Technical Summary

Technical Problem

In traditional agent-based systems, the calling process of large-model plug-ins is complex and inefficient, and developers need to constantly write new code to deal with different conversations, resulting in the expansion of tool code and the calling process.

Method used

By obtaining the open interface description document of the big model plug-in, parsing parameter information, loading the general big model plug-in, and using it as a redirect plug-in, it realizes functional replacement of the big model plug-in and simplifying the calling process.

Benefits of technology

The general big model plug-in can be loaded without modifying the code, which simplifies the calling process and improves the calling efficiency of the big model plug-in, making the call of tool instances simpler and more convenient.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119105815A_ABST
    Figure CN119105815A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of large models, in particular to a method and device for loading a large model plug-in and a storage medium. Comprising the following steps: determining at least one large model plug-in to be loaded; for any large model plug-in, acquiring an open interface description document corresponding to any large model plug-in, and analyzing the open interface description document to obtain analysis parameter information corresponding to any large model plug-in; loading the universal large model plug-ins, and transmitting the address of the analysis parameter information corresponding to any large model plug-in as an initialization parameter to the universal large model plug-ins; and determining the universal large model plug-in as the redirection plug-in corresponding to any large model plug-in, so that the large model intelligent agent can replace to call the redirection plug-in corresponding to any large model plug-in under the condition of calling any large model plug-in, codes do not need to be modified, the universal large model plug-in can be directly loaded, the calling process is simplified, and the calling efficiency is improved. And the calling efficiency of the large model plug-in is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of large model technology, and in particular to a method, device and storage medium for loading a large model plug-in. Background Art

[0002] In traditional agent-based systems, it is necessary to implement the function of large models obtaining external data through business interfaces. Developers are usually required to write corresponding codes according to the business interfaces before the system runs to develop corresponding tools (plug-ins). That is, one conversation corresponds to one tool, and the parameters of each tool are fixed. Then, the system can only implement the written tools to complete related conversations. When there is a new conversation, the corresponding code needs to be rewritten to develop a new tool, and then the new tool is called to answer user questions. The continuous development of new tools causes the tool code to continue to expand, and the tool calling process is complicated and the calling efficiency is low. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a method, device and storage medium for loading a large model plug-in, so as to solve the problem of complex and inefficient large model plug-in calling process in the prior art.

[0004] In order to achieve the above-mentioned object, the first aspect of the present application provides a method for loading a large model plug-in, comprising:

[0005] Determining at least one large model plug-in to be loaded;

[0006] For any large model plug-in, obtain the open interface description document corresponding to any large model plug-in, and parse the open interface description document to obtain the parsing parameter information corresponding to any large model plug-in;

[0007] Loading the general large model plug-in, passing the address of the parsing parameter information corresponding to any large model plug-in as an initialization parameter to the general large model plug-in, so that the general large model plug-in executes an initialization method, the initialization method comprising: obtaining the corresponding parsing parameter information based on the address in the initialization parameter, constructing a parasitic virtual plug-in based on the parsing parameter information, the parasitic virtual plug-in having the same function as the large model plug-in corresponding to the parsing parameter information;

[0008] The universal large model plug-in is determined as the redirection plug-in corresponding to any large model plug-in, so that when the large model intelligent agent intends to call any large model plug-in, it will call the redirection plug-in corresponding to any large model plug-in as an alternative.

[0009] In an embodiment of the present application, the general large model plug-in includes a Pydantic model, and the initialization method specifically includes: the general large model plug-in assigns a value to the Pydantic model based on parsed parameter information to obtain the assigned Pydantic model; and constructs a parasitic virtual plug-in based on the assigned Pydantic model.

[0010] In an embodiment of the present application, the Pydantic model includes a parameter structure model and a tool structure model. The general large model plug-in assigns values ​​to the Pydantic model based on the parsed parameter information, including: the general large model plug-in assigns values ​​to the name field, interface description field and required fields included in the parameter structure model based on the parsed parameter information to obtain the assigned parameter structure model; the general large model plug-in assigns values ​​to the name field, interface description field and interface parameter field included in the tool structure model based on the parsed parameter information to obtain the assigned tool structure model.

[0011] In an embodiment of the present application, the parsing parameter information includes at least one of an interface path, an interface description, a calling protocol, authentication information, and an interface parameter.

[0012] In an embodiment of the present application, the method also includes: obtaining interface metadata and plug-in metadata input by the user for building a new large model plug-in, generating and storing an open interface description document corresponding to the new large model plug-in based on the interface metadata and plug-in metadata; and / or obtaining and storing an open interface description document corresponding to the new large model plug-in input by the user.

[0013] In an embodiment of the present application, the method also includes: after determining the general big model plug-in as the redirection plug-in corresponding to any big model plug-in, inputting the function call standardized parameters obtained by converting the parsed parameter information corresponding to any big model plug-in into the big model intelligent agent to construct a function call intention recognition dialogue scenario; obtaining the function call information generated by the big model intelligent agent based on the question to be answered input by the user and the historical context corresponding to the question to be answered in the function call intention recognition dialogue scenario, the function call information including the name and call parameters of the big model plug-in to be called; in the case where the big model plug-in to be called is any big model plug-in, calling the redirection plug-in based on the call parameters, and providing the call result returned by the redirection plug-in to the user.

[0014] In an embodiment of the present application, the call result returned by the redirection plug-in is provided to the user, including: providing the call result to the user as an answer to the question to be answered; or, feeding back the call result to the large model intelligent agent, so that the large model intelligent agent can semantically understand and textually integrate the call result with other call results and historical context to obtain a corresponding integrated result, and provide the integrated result to the user as an answer to the question to be answered.

[0015] In an embodiment of the present application, determining at least one large model plug-in to be loaded includes: determining the large model plug-in selected by the user during the configuration process of the large model intelligent agent as the at least one large model plug-in to be loaded.

[0016] A second aspect of the present application provides a device for loading a large model plug-in, comprising:

[0017] a memory configured to store instructions;

[0018] The processor is configured to call instructions from the memory and implement the above method for loading a large model plug-in when executing the instructions.

[0019] A third aspect of the present application provides a machine-readable storage medium having instructions stored thereon, the instructions being used to enable a machine to execute the above-mentioned method for loading a large model plug-in.

[0020] Through the above technical scheme, at least one large model plug-in to be loaded is determined; for any large model plug-in, an open interface description document corresponding to any large model plug-in is obtained, and the open interface description document is parsed to obtain the parsing parameter information corresponding to any large model plug-in; a general large model plug-in is loaded, and the address of the parsing parameter information corresponding to any large model plug-in is passed into the general large model plug-in as an initialization parameter, so that the general large model plug-in executes an initialization method, the initialization method comprising: obtaining corresponding parsing parameter information based on the address in the initialization parameter, constructing a parasitic virtual plug-in based on the parsing parameter information, the parasitic virtual plug-in having the same function as the large model plug-in corresponding to the parsing parameter information; determining the general large model plug-in as a redirection plug-in corresponding to any large model plug-in, so that when the large model intelligent agent intends to call any large model plug-in, it can call the redirection plug-in corresponding to any large model plug-in as a substitute, without modifying the code, and can directly load the general large model plug-in, so that the general large model plug-in has the same function as the large model plug-in, and then when the large model intelligent agent calls, it calls the corresponding general large model plug-in as a substitute, which simplifies the calling process and improves the calling efficiency of the large model plug-in.

[0021] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present application, but do not constitute a limitation on the embodiments of the present application. In the accompanying drawings:

[0023] Figure 1A schematic diagram of a process for loading a large model plug-in according to an embodiment of the present application is shown;

[0024] Figure 2 A schematic diagram schematically shows a method for loading a large model plug-in according to an embodiment of the present application;

[0025] Figure 3 The internal structure of a computer device according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present application, and are not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0027] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back...), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0028] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0029] Figure 1 The following schematically shows a flow chart of a method for loading a large model plug-in according to an embodiment of the present application. Figure 1 As shown, an embodiment of the present application provides a method for loading a large model plug-in, which may include the following steps.

[0030] Step 101: Determine at least one large model plug-in to be loaded.

[0031] The processor may determine at least one large model plug-in to load.

[0032] In an embodiment of the present application, determining at least one large model plug-in to be loaded includes: determining the large model plug-in selected by the user during the configuration process of the large model intelligent agent as the at least one large model plug-in to be loaded.

[0033] The processor may determine the large model plug-in selected by the user during the configuration process of the large model intelligent agent as at least one large model plug-in to be loaded.

[0034] Step 102: for any large model plug-in, obtain an open interface description document corresponding to any large model plug-in, and parse the open interface description document to obtain parsing parameter information corresponding to any large model plug-in.

[0035] Step 103: Load the general large model plug-in, and pass the address of the parsing parameter information corresponding to any large model plug-in as an initialization parameter to the general large model plug-in, so that the general large model plug-in executes the initialization method, the initialization method includes: obtaining the corresponding parsing parameter information based on the address in the initialization parameter, and constructing a parasitic virtual plug-in based on the parsing parameter information. The parasitic virtual plug-in has the same function as the large model plug-in corresponding to the parsing parameter information.

[0036] Step 104: determine the general large model plug-in as the redirection plug-in corresponding to any large model plug-in, so that when the large model intelligent agent intends to call any large model plug-in, it will call the redirection plug-in corresponding to any large model plug-in as an alternative.

[0037] After determining at least one large model plug-in to be loaded, for any large model plug-in, the processor can obtain the open interface description document (OpenAPI description document) corresponding to any large model plug-in, and parse the open interface description document to obtain the parsing parameter information corresponding to any large model plug-in. In an embodiment of the present application, the parsing parameter information includes at least one of an interface path, an interface description, a call protocol, authentication information, and an interface parameter. Among them, the OpenAPI description document generally refers to a specification for describing a RestFull-style API interface.

[0038] After obtaining the parsing parameter information corresponding to any of the large model plug-ins, the processor can load the general large model plug-in (ApiSpecTool), and input the address of the parsing parameter information corresponding to any of the large model plug-ins as an initialization parameter to the general large model plug-in, so that the general large model plug-in executes the initialization method. The initialization scheme includes: obtaining the corresponding parsing parameter information based on the address in the initialization parameter, and after obtaining the parsing parameter information, constructing a parasitic virtual plug-in based on the parsing parameter information, and the parasitic virtual plug-in has the same function as the large model plug-in corresponding to the parsing parameter information. After loading the general large model plug-in, the processor can determine the general large model plug-in as the redirection plug-in corresponding to any of the large model plug-ins, so that the large model intelligent agent (Agent) calls the redirection plug-in corresponding to any of the large model plug-ins as an alternative when calling any of the large model plug-ins.

[0039] In the existing Agent-based systems, it is necessary to implement large models to obtain external data through business interfaces. Generally, developers define different parameters according to specific business functions and develop different tools. That is, developers need to implement corresponding tools based on business interfaces, and implement descriptions of business interfaces, parameter descriptions, and interface call logic in the tools. If new business interfaces need to be accessed, developers need to develop new tools. It can be seen that the parameters of existing tools are fixed and cannot be defined based on business interface configuration.

[0040] In response to the above problems, the present application designs a universal big model plug-in (ApiSpecTool), and the tool is essentially an OpenAPI description document. The business tool instance is instantiated through the universal big model plug-in, and the universal big model plug-in serves as a universal launcher of the real tool function of each OpenAPI description document. A series of information such as business interface and interface parameters are not solidified. Only when the instantiation is loaded, the business interface and interface parameters for specific execution of the tool instance will be given, so that the intelligent agent can directly call the instantiated universal big model plug-in, realizing code-free configuration of the plug-in and plug-in modification, and there is no need to add a new tool. By loading the universal big model plug-in, the tool instances corresponding to various business interfaces can be realized, making the calling of tool instances simpler and more convenient.

[0041] In an embodiment of the present application, the general large model plug-in includes a Pydantic model, and the initialization method specifically includes: the general large model plug-in assigns a value to the Pydantic model based on parsed parameter information to obtain the assigned Pydantic model; and constructs a parasitic virtual plug-in based on the assigned Pydantic model.

[0042] The general large model plug-in includes a Pydantic model, and the specific initialization method is: the general large model plug-in assigns a value to the Pydantic model based on the parsed parameter information to obtain the assigned Pydantic model. After obtaining the assigned Pydantic model, the general large model plug-in can build a parasitic virtual plug-in based on the assigned Pydantic model. Among them, the Pydantic model refers to a model used by the python library to verify the input data type and structure.

[0043] In an embodiment of the present application, the Pydantic model includes a parameter structure model and a tool structure model. The general large model plug-in assigns values ​​to the Pydantic model based on the parsed parameter information, including: the general large model plug-in assigns values ​​to the name field (name), interface description field (description) and required field (required) included in the parameter structure model based on the parsed parameter information to obtain the assigned parameter structure model; the general large model plug-in assigns values ​​to the name field (name), interface description field (description) and interface parameter field (parameters) included in the tool structure model based on the parsed parameter information to obtain the assigned tool structure model.

[0044] The Pydantic model includes a parameter structure model (ParametersSchema) and a tool structure model (ToolSchema). The general large model plug-in can assign values ​​to the Pydantic model based on the parsed parameter information. Specifically, the general large model plug-in can assign values ​​to the name field, interface description field, and required fields included in the parameter result model based on the parsed parameter information to obtain the assigned parameter structure model. The general large model plug-in can assign values ​​to the name field, interface description field, and interface parameter field included in the tool structure model based on the parsed parameter information to obtain the assigned tool structure model.

[0045] In an embodiment of the present application, the method also includes: obtaining interface metadata and plug-in metadata input by the user for building a new large model plug-in, generating and storing an open interface description document corresponding to the new large model plug-in based on the interface metadata and plug-in metadata; and / or obtaining and storing an open interface description document corresponding to the new large model plug-in input by the user.

[0046] The processor may obtain the interface metadata and plug-in metadata input by the user for building the new large model plug-in. After obtaining the interface metadata and plug-in metadata, the processor may generate and store the open interface description document corresponding to the new large model plug-in based on the interface metadata and plug-in metadata; and / or, the processor may directly obtain and store the open interface description document corresponding to the new large model plug-in input by the user.

[0047] In an embodiment of the present application, the method also includes: after determining the general big model plug-in as the redirection plug-in corresponding to any big model plug-in, inputting the function call standardized parameters obtained by converting the parsed parameter information corresponding to any big model plug-in into the big model intelligent agent to construct a function call intention recognition dialogue scenario; obtaining the function call information generated by the big model intelligent agent based on the question to be answered input by the user and the historical context corresponding to the question to be answered in the function call intention recognition dialogue scenario, the function call information including the name and call parameters of the big model plug-in to be called; in the case where the big model plug-in to be called is any big model plug-in, calling the redirection plug-in based on the call parameters, and providing the call result returned by the redirection plug-in to the user.

[0048] After determining the general large model plug-in as the redirection plug-in corresponding to any large model plug-in, the processor can input the function call standardized parameters (FunctionCall format parameters) obtained by converting the parsed parameter information corresponding to any large model plug-in into the large model intelligent agent to build a function call intention recognition dialogue scenario. The processor can obtain the function call information (such as function name and parameter call parameters) generated by the large model intelligent agent in the function call intention recognition dialogue scenario based on the question to be answered input by the user and the historical context corresponding to the question to be answered. The function call information includes the name and call parameters of the large model plug-in to be called. In the case where the large model plug-in to be called is any large model plug-in, the processor can call the redirection plug-in based on the call parameters, and provide the call result returned by the redirection plug-in to the user.

[0049] In an embodiment of the present application, the call result returned by the redirection plug-in is provided to the user, including: providing the call result to the user as an answer to the question to be answered; or, feeding back the call result to the large model intelligent agent, so that the large model intelligent agent can semantically understand and textually integrate the call result with other call results and historical context to obtain a corresponding integrated result, and provide the integrated result to the user as an answer to the question to be answered.

[0050] The processor can provide the call result returned by the redirection plug-in to the user. Specifically, the processor can provide the call result to the user as the answer to the question to be answered. Alternatively, the processor can feed back the call result to the large model intelligent agent, so that the large model intelligent agent can semantically understand and textually integrate the call result with other call results and historical context to obtain the corresponding integrated result, and provide the integrated result to the user as the answer to the question to be answered. In the case where a question to be answered involves calling multiple plug-ins, the answer to the question to be answered can be integrated with the call results of multiple plug-ins using the semantic understanding ability of the large model intelligent agent and then fed back to the user, so as to provide the user with a more accurate call result.

[0051] In the embodiments of the present application, Figure 2 As shown, the processor can obtain the interface metadata information and plug-in metadata information configured and input by the user, wherein the interface metadata information is used to describe the purpose, parameters, and protocols of the interface; the plug-in metadata information describes the user of the plug-in, and the basic information of the plug-in filled in by the user, including the plug-in name, plug-in description, authorization method-verification information, etc. After obtaining the metadata information and plug-in metadata information, the processor can publish the plug-in, that is, convert the interface metadata and plug-in metadata into an OpenAPI description document and store it to obtain a new tool library. Alternatively, the processor can obtain the OpenAPI description document input by the user and store it to obtain a new tool library.

[0052] The processor can obtain user text input and determine whether to configure the binding Tool plug-in during the Agent initialization process. After configuring the binding Tool plug-in, the processor can call the ApiSpecTool method to load and parse the OpenAPI description document to obtain the serverUrl and Path node lists. Among them, each Path node in the serverUrl and Path node lists includes parameter information of the business interface, such as path url, interface description, call protocol method (including the following types: GET (used to request to retrieve data from the server)\POST (used to submit new data to the server)\DELETE (used to request the server to delete specified data)\PATCH (used to update specified data)), authentication information credentials, parameters parameters (including parameter types (query parameters (query string parameters), requestBody parameters (request body parameters), header parameters (request header parameters), cookie parameters (client browser parameters), PathParam parameters (request path parameters)), parameter data types, parameter descriptions, default values, etc.).

[0053] After obtaining the serverUrl and Path node lists, the processor calls the ApiSpecTool method to load the ApiSpecTool (i.e., the general large model plug-in) from the traditional Tool library. The serverUrl and Path node list addresses are passed in to enable the ApiSpecTool to execute the initialization method, and to call the virtual Tool implementation method to construct a parasitic virtual plug-in (i.e., virtual Tool (parasitic Tool)). That is, the ApiSpecTool obtains the parameter information of the business interface based on the serverUrl and Path node list addresses, and constructs a virtual Tool based on the parameter information of the business interface. The virtual Tool has the same function as the Tool plug-in corresponding to the parameter information of the business interface.

[0054] Specifically, ApiSpecTool obtains the parameter information of the business interface based on the address of the serverUrl and Path node list, configures the Pydantic model based on the parameter information of the business interface, and builds a virtual Tool based on the assigned Pydantic model.

[0055] The loaded ApiSpecTool can be provided to the Agent by plugging and unplugging, so that the Agent calls the ApiSpecTool to obtain the call result and feeds back the call result to the user. The method of providing the ApiSpecTool capable of loading the corresponding Tool function to the Agent for use is defined as an AIGC (Artificial Intelligence Generated Content) plug-in.

[0056] Among them, the traditional Tool library is developed in advance in a traditional way. After building the virtual Tool in ApiSpecTool, the processor can use the plug-in in the dialogue, that is, call ApiSpecTool through the Agent to obtain the call result, and return the result to the Agent, so that the Agent processes the call result and returns the processed result to the user.

[0057] Among them, the ApiSpecTool method defines attributes such as name, description, url, method, and parameters to store basic API information and call parameters. The _remote_parse_input method (input parameter parsing method) is defined to parse the passed parameters to create a nested dictionary based on the hierarchical results of the parameter names, which contains all the parameters. The parse_output method (output parameter parsing method) is defined to parse the results of the API response and return a dictionary containing the results. The sign method (signature algorithm) is defined for encryption processing. For example, app_key (signature verification key) can be used for encryption. The generate_sign method (used to generate signatures) is defined to generate the signature of the API request, and the request header can also be set. The _run method is defined to execute the API request to obtain the call result.

[0058] The above technical solution can directly load the general large model plug-in without modifying the code, so that the general large model plug-in has the same function as the large model plug-in, and then when the large model intelligent agent calls, it can be used as a substitute for calling the corresponding general large model plug-in, which simplifies the calling process and improves the calling efficiency of the large model plug-in.

[0059] Figure 1 FIG. 1 is a flow chart of a method for loading a large model plug-in in one embodiment. It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0060] The embodiment of the present application also provides a device for loading a large model plug-in, including:

[0061] a memory configured to store instructions;

[0062] The processor is configured to call instructions from the memory and implement the above method for loading a large model plug-in when executing the instructions.

[0063] An embodiment of the present application also provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to enable a machine to execute the above-mentioned method for loading a large model plug-in.

[0064] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor A01, a network interface A02, a memory (not shown in the figure) and a database (not shown in the figure) connected via a system bus. Among them, the processor A01 of the computer device is used to provide computing and control capabilities. The memory of the computer device includes an internal memory A03 and a non-volatile storage medium A04. The non-volatile storage medium A04 stores an operating system B01, a computer program B02 and a database (not shown in the figure). The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 in the non-volatile storage medium A04. The database of the computer device is used to store data such as open interface description documents and parsing parameter information. The network interface A02 of the computer device is used to communicate with an external terminal through a network connection. When the computer program B02 is executed by the processor A01, a method for loading a large model plug-in is implemented.

[0065] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0066] An embodiment of the present application provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: determining at least one large model plug-in to be loaded; for any large model plug-in, obtaining an open interface description document corresponding to any large model plug-in, and parsing the open interface description document to obtain parsing parameter information corresponding to any large model plug-in; loading a general large model plug-in, and passing the address of the parsing parameter information corresponding to any large model plug-in as an initialization parameter to the general large model plug-in, so that the general large model plug-in executes an initialization method, the initialization method including: obtaining corresponding parsing parameter information based on the address in the initialization parameter, constructing a parasitic virtual plug-in based on the parsing parameter information, the parasitic virtual plug-in having the same function as the large model plug-in corresponding to the parsing parameter information; determining the general large model plug-in as a redirection plug-in corresponding to any large model plug-in, so that when the large model intelligent agent intends to call any large model plug-in, it calls the redirection plug-in corresponding to any large model plug-in as an alternative.

[0067] In one embodiment, the general large model plug-in includes a Pydantic model, and the initialization method specifically includes: the general large model plug-in assigns a value to the Pydantic model based on parsed parameter information to obtain the assigned Pydantic model; and constructs a parasitic virtual plug-in based on the assigned Pydantic model.

[0068] In one embodiment, the Pydantic model includes a parameter structure model and a tool structure model, and the general large model plug-in assigns values ​​to the Pydantic model based on the parsed parameter information, including: the general large model plug-in assigns values ​​to the name field, interface description field and required fields included in the parameter structure model based on the parsed parameter information to obtain the assigned parameter structure model; the general large model plug-in assigns values ​​to the name field, interface description field and interface parameter field included in the tool structure model based on the parsed parameter information to obtain the assigned tool structure model.

[0069] In one embodiment, the parsing parameter information includes at least one of an interface path, an interface description, a calling protocol, authentication information, and an interface parameter.

[0070] In one embodiment, the method also includes: obtaining interface metadata and plug-in metadata input by the user for building a new large model plug-in, generating and storing an open interface description document corresponding to the new large model plug-in based on the interface metadata and plug-in metadata; and / or obtaining and storing an open interface description document corresponding to the new large model plug-in input by the user.

[0071] In one embodiment, the method also includes: after determining the general large model plug-in as the redirection plug-in corresponding to any large model plug-in, inputting the function call standardized parameters obtained by converting the parsed parameter information corresponding to any large model plug-in into the large model intelligent agent to build a function call intention recognition dialogue scenario; obtaining the function call information generated by the large model intelligent agent based on the question to be answered input by the user and the historical context corresponding to the question to be answered in the function call intention recognition dialogue scenario, the function call information including the name and call parameters of the large model plug-in to be called; in the case where the large model plug-in to be called is any large model plug-in, calling the redirection plug-in based on the call parameters, and providing the call result returned by the redirection plug-in to the user.

[0072] In one embodiment, the call result returned by the redirection plug-in is provided to the user, including: providing the call result to the user as an answer to the question to be answered; or, feeding back the call result to the large model intelligent agent, so that the large model intelligent agent can semantically understand and textually integrate the call result with other call results and historical context to obtain a corresponding integrated result, and provide the integrated result to the user as an answer to the question to be answered.

[0073] In one embodiment, determining at least one large model plug-in to be loaded includes: determining a large model plug-in selected by a user during configuration of the large model intelligent agent as the at least one large model plug-in to be loaded.

[0074] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program of initializing the method steps for loading a large model plug-in.

[0075] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0076] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0077] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0078] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0079] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0080] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0081] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0082] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0083] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A method for loading a large model plug-in, characterized in that: The method comprises: Determining at least one large model plug-in to be loaded; For any large model plug-in, obtain an open interface description document corresponding to the large model plug-in, and parse the open interface description document to obtain parsing parameter information corresponding to the large model plug-in; Loading a general large model plug-in, passing the address of the parsing parameter information corresponding to any large model plug-in as an initialization parameter to the general large model plug-in, so that the general large model plug-in executes an initialization method, the initialization method comprising: obtaining corresponding parsing parameter information based on the address in the initialization parameter, constructing a parasitic virtual plug-in based on the parsing parameter information, the parasitic virtual plug-in having the same function as the large model plug-in corresponding to the parsing parameter information; The general large model plug-in is determined as the redirection plug-in corresponding to any of the large model plug-ins, so that when the large model intelligent agent intends to call any of the large model plug-ins, it calls the redirection plug-in corresponding to any of the large model plug-ins as an alternative.

2. The method for loading a large model plug-in according to claim 1, characterized in that: The general large model plug-in includes a Pydantic model, and the initialization method specifically includes: The general large model plug-in assigns a value to the Pydantic model based on the parsing parameter information to obtain the assigned Pydantic model; The parasitic virtual plug-in is constructed based on the assigned Pydantic model.

3. The method for loading a large model plug-in according to claim 2, characterized in that: The Pydantic model includes a parameter structure model and a tool structure model, and the general large model plug-in assigns the Pydantic model based on the parsed parameter information, including: The general large model plug-in assigns values ​​to the name field, the interface description field and the required fields included in the parameter structure model based on the parsed parameter information to obtain the parameter structure model after the assignment; The general large model plug-in assigns values ​​to the name field, the interface description field and the interface parameter field included in the tool structure model based on the parsing parameter information to obtain the tool structure model after the assignment.

4. The method for loading a large model plug-in according to claim 1, characterized in that: The parsing parameter information includes at least one of an interface path, an interface description, a calling protocol, authentication information, and an interface parameter.

5. The method for loading a large model plug-in according to claim 1, characterized in that: The method further comprises: Acquire the interface metadata and plug-in metadata input by the user for building the new large model plug-in, and generate and store the open interface description document corresponding to the new large model plug-in based on the interface metadata and the plug-in metadata; And / or, obtaining and storing an open interface description document corresponding to the new large model plug-in input by the user.

6. The method for loading a large model plug-in according to claim 1, characterized in that: The method further comprises: After determining the general large model plug-in as the redirection plug-in corresponding to any of the large model plug-ins, the function call standardized parameters obtained by converting the parsing parameter information corresponding to any of the large model plug-ins are input into the large model intelligent agent to construct a function call intention recognition dialogue scenario; Obtaining function call information generated by the large model intelligent agent in the function call intention recognition dialogue scenario based on the unanswered question input by the user and the historical context corresponding to the unanswered question, wherein the function call information includes the name and call parameters of the large model plug-in to be called; In the case that the large model plug-in to be called is any of the large model plug-ins, the redirection plug-in is called based on the calling parameters, and the calling result returned by the redirection plug-in is provided to the user.

7. The method for loading a large model plug-in according to claim 6, characterized in that: The providing the call result returned by the redirection plug-in to the user includes: Providing the calling result to the user as an answer to the question to be answered; Alternatively, the call result is fed back to the large model intelligent agent, so that the large model intelligent agent can perform semantic understanding and text integration of the call result with other call results and the historical context to obtain a corresponding integrated result, and provide the integrated result to the user as an answer to the question to be answered.

8. The method for loading a large model plug-in according to claim 1, characterized in that: The determining of at least one large model plug-in to be loaded comprises: The large model plug-in selected by the user during the configuration process of the large model intelligent agent is determined as the at least one large model plug-in to be loaded.

9. A device for loading a large model plug-in, characterized in that: include: a memory configured to store instructions; A processor is configured to call the instructions from the memory and implement the method for loading a large model plug-in according to any one of claims 1 to 8 when executing the instructions.

10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores instructions for causing a machine to execute the method for loading a large model plug-in according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Plug-in support method based on preloading mechanism

    CN104679572A

  • Method and device for loading and using local plug-in in browser and computing equipment

    CN114721745A

  • Deep learning reasoning framework extension method and device, equipment and medium

    CN116341663A

  • Method, device and equipment for intelligently acquiring information and storage medium

    CN117312641A

  • Open programmable implementation method, system and device for wireless base station and medium

    CN118012415A