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

By loading a general large model plug-in and using the Pydantic model to build a parasitic virtual plug-in, the problem of complex and inefficient calling of traditional large model plug-ins is solved, and the effect of simplifying calling and improving efficiency is achieved.

CN119105815BActive Publication Date: 2025-09-26ZHONGKE YUNGU TECH
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The traditional large model plug-in calling process is complex and inefficient, and new tools need to be continuously developed to meet new dialogue requirements.

Method used

By loading the general large model plug-in and using the Pydantic model to build a parasitic virtual plug-in, the interface description document is parsed and the parameter information is initialized. It is used as a redirection plug-in to replace the specific large model plug-in, simplifying the calling process.

Benefits of technology

General large model plug-ins can be loaded without modifying the code, which simplifies the calling process and improves the calling efficiency of large model plug-ins.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119105815B_ABST
    Figure CN119105815B_ABST
Patent Text Reader

Abstract

The present application relates to the field of large model technology, and in particular to a method, device, and storage medium for loading large model plug-ins. The method comprises: 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; 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 will call the redirection plug-in corresponding to any large model plug-in as an alternative, without modifying the code, and can directly load the general large model plug-in, thereby simplifying the calling process and improving the calling efficiency of the large model plug-in.
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] Traditional agent-based systems require large models to access external data through business interfaces. This typically requires developers to write code based on the business interfaces before the system is operational, creating corresponding tools (plug-ins). Specifically, each conversation corresponds to a tool, and each tool's parameters are fixed. Consequently, the system can only use pre-written tools to complete the corresponding conversation. When a new conversation arises, the corresponding code must be rewritten to develop a new tool, which is then called to answer user questions. This continuous development of new tools leads to continuous expansion of tool code, complex tool calling processes, and low call efficiency. 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] To achieve the above objectives, the present application provides, in a first aspect, 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 a universal large model plug-in, passing the address of parsing parameter information corresponding to any large model plug-in as an initialization parameter to the universal large model plug-in, so that the universal 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;

[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 an 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 parsed 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 constructing 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 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 construct 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; when 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.

[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 perform semantic understanding and text integration of 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 the large model plug-in when executing the instructions.

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

[0020] Through the above technical solution, at least one large model plug-in to be loaded is determined; for any large model plug-in, the 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; the 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 the initialization method, the initialization method including: 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; determining 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 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 will call the corresponding general large model plug-in as a substitute, simplifying the calling process and improving 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 detailed description. 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 detailed description, 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 1The following schematically illustrates a flow chart of a method for loading a large model plug-in according to an embodiment of the present application;

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

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

[0026] To make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions 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, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the various components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indications 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 for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the fact that they can be implemented by ordinary technicians in this field. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a 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 be loaded.

[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 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.

[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 universal 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 the any large model plug-in, and parse the open interface description document to obtain the parsing parameter information corresponding to the 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 large model plug-in, the processor can load the general large model plug-in (ApiSpecTool), and input 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 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 large model plug-in, so that the large model intelligent agent (Agent) calls the redirection plug-in corresponding to any large model plug-in as an alternative when calling any large model plug-in.

[0039] In existing agent-based systems, large models need to access external data through business interfaces. Typically, developers define parameters based on specific business functions and develop different tools. This requires developers to implement corresponding tools based on business interfaces, describing the interfaces, describing the parameters, and implementing the interface call logic. Consequently, when new business interfaces need to be integrated, developers must develop new tools. Consequently, existing tool parameters are fixed and cannot be configured based on business interfaces.

[0040] In response to the above problems, this 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 will the tool instance be given the specific execution business interface and interface parameters, so that the intelligent agent can directly call the instantiated universal big model plug-in, realizing code-free configuration and modification of plug-ins, 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 call 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 an assigned Pydantic model; and constructs a parasitic virtual plug-in based on the assigned Pydantic model.

[0042] The Universal Large Model plugin includes a Pydantic model. Initialization is as follows: The Universal Large Model plugin assigns values ​​to the Pydantic model based on parsed parameter information to obtain the assigned Pydantic model. After obtaining the assigned Pydantic model, the Universal Large Model plugin constructs a parasitic virtual plugin based on the assigned Pydantic model. The Pydantic model is a model used by the Python library to verify input data types and structures.

[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 constructing 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 interface metadata and plug-in metadata input by the user for constructing the new large model plug-in. After obtaining the interface metadata and plug-in metadata, the processor may generate and store an 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 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 construct 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; when 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.

[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 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 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 perform semantic understanding and text integration of 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 redirect 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 the call result back to the large model intelligent agent, so that the large model intelligent agent can perform semantic understanding and text integration on 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 that a question to be answered involves calling multiple plug-ins, the answer to the question to be answered can be fed back to the user after integrating the call results of multiple plug-ins using the semantic understanding ability of the large model intelligent agent, so as to provide the user with a more accurate call result.

[0051] In the embodiments of this 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 protocol 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 the 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 (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 type, parameter description, default value, 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, causing ApiSpecTool to execute the initialization method, which then calls the virtual Tool implementation method to construct a parasitic virtual plug-in (i.e., virtual Tool). That is, 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 this business interface parameter information. The virtual Tool has the same functionality as the Tool plug-in corresponding to the business interface parameter information.

[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 through plug-in and unplugging, allowing the Agent to call the ApiSpecTool, obtain the call results, and feedback the call results to the user. This method of providing the ApiSpecTool that can load the corresponding tool function to the Agent for use is defined as an AIGC (Artificial Intelligence Generated Content) plug-in.

[0056] The traditional tool library is pre-developed using traditional methods. After building a virtual tool in ApiSpecTool, the processor can use the plug-in in the conversation, that is, call ApiSpecTool through the agent to obtain the call result and return the result to the agent, which then processes the call result and returns the processed result to the user.

[0057] Among them, the ApiSpecTool method defines attributes such as name (name), description (interface description), url (interface path), method (calling protocol), and parameters (parameters) to store the basic information and calling parameters of the API. The _remote_parse_input method (input parameter parsing method) is defined to parse the incoming 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 functions as the large model plug-in, and then, when the large model intelligent agent calls, it can be used as a substitute to call 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. In addition, 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 further provides a device for loading a large model plug-in, comprising:

[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 the large model plug-in when executing the instructions.

[0063] An embodiment of the present application also provides a machine-readable storage medium having stored thereon instructions for causing 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 shown in the figure, or combine certain components, or have a different component arrangement.

[0066] An embodiment of the present application provides a device, which includes a processor, a memory, and a program stored in the memory and capable of running 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 an 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. 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 constructing 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 construct 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 that 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 redirect 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 perform semantic understanding and text integration of 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 can be provided as methods, systems or computer program products. Therefore, the present application can 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 can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic 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 produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. 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 that can direct a computer or other programmable data processing device to work 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 The 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 operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0079] In a typical configuration, a computing device includes one or more processors (CPUs), 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 includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The 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 disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic 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 transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0082] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0083] The above are merely 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 modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all 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, obtaining an open interface description document corresponding to the large model plug-in, and parsing the open interface description document to obtain parsing parameter information corresponding to the large model plug-in; Loading a universal large model plug-in, passing the address of parsing parameter information corresponding to any of the large model plug-ins as an initialization parameter to the universal large model plug-in, so that the universal 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 will call 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 an 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. 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 assigned tool structure model.

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: Obtaining interface metadata and plug-in metadata input by a user for constructing 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 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 parsed 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 question to be answered input by the user and the historical context corresponding to the question to be answered, wherein the function call information includes the name and call parameters of the large model plug-in to be called; In a case where 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: Providing the call result returned by the redirect plug-in to the user includes: providing the call 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 on the call result, other call results and the historical context to obtain a corresponding integration result, and provide the integration result to the user as the answer to the question to be answered.

8. The method for loading a large model plug-in according to claim 1, characterized in that: Determining at least one large model plug-in to be loaded includes: 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

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

    CN116341663A