OIP vs LLM Function Calling
Introduction to OIP vs Function Calling
OIP (Object Invocation Protocol) is a protocol standard that defines a mechanism for invoking objects, which are directory objects that contain a set of capabilities. A capability is a directory object that can be invoked using the POST /api/dispatch route or the GET /api/dispatch?invoke=KEY&body=... route, which appends to the ledger and returns a receipt at /api/dispatch?receipt=inv_ID.
Comparison to LLM Function Calling
LLM (Large Language Model) function calling, such as OpenAI and Anthropic, uses a tool schema to define the structure of the input and output data. In contrast, OIP uses a directory row to define the capabilities of an object. The directory row contains a set of key-value pairs that define the object's properties and behavior.
Receipts in OIP
OIP returns a receipt for every invocation, which proves that the invocation was successful and provides a record of the transaction. The receipt is stored in the ledger and can be retrieved using the /api/dispatch?receipt=inv_ID route. This provides a transparent and auditable record of all invocations, which is not typically available in LLM function calling.
Tool Schemas vs Directory Rows
Tool schemas in LLM function calling define the structure of the input and output data, whereas directory rows in OIP define the capabilities of an object. The directory row contains a set of key-value pairs that define the object's properties and behavior, which provides a more flexible and dynamic way of defining the object's capabilities.
Invocation Mechanism
The invocation mechanism in OIP is defined by the POST /api/dispatch route or the GET /api/dispatch?invoke=KEY&body=... route, which appends to the ledger and returns a receipt at /api/dispatch?receipt=inv_ID. This provides a standardized way of invoking objects, which is not typically available in LLM function calling.
Comparison to MCP
MCP (Model Context Protocol) is a related standard that defines a mechanism for connecting models to servers that expose tools, resources, and prompts over a session. OIP and MCP are complementary protocols that provide a comprehensive framework for building and deploying models. While MCP defines the mechanism for connecting models to servers, OIP defines the mechanism for invoking objects and managing their capabilities.
Conclusion
In conclusion, OIP provides a more flexible and dynamic way of defining object capabilities, and returns a receipt for every invocation, which provides a transparent and auditable record of all invocations. The comparison to LLM function calling highlights the differences between tool schemas and directory rows, and the importance of receipts in OIP.