A method for calling a
client tool and a gateway, the method is executed by the gateway, and the method comprises the following steps: receiving a
query statement of a to-be-input
server large model and a connection
channel identifier of a first connection from a
client through the first connection; sending the
query statement and the connection
channel identifier to the
server through a second connection, wherein the second connection transmits data based on a
stateless protocol; receiving a tool calling request and the connection
channel identifier from a
server through the second connection, wherein the tool calling request comprises a request identifier and a tool name of a tool provided by the
client; acquiring the first connection based on the connection channel identifier; the tool calling request is sent to the client through the first connection; receiving a tool calling result from the client through the first connection, wherein the tool calling result comprises the request identifier; and sending the tool calling result to the server through the second connection.