Explorar el Código

interfaces: allow for $defs and items in Tool interface (#218)

Parth Sareen hace 1 mes
padre
commit
e4f9c8f948
Se han modificado 1 ficheros con 12 adiciones y 8 borrados
  1. 12 8
      src/interfaces.ts

+ 12 - 8
src/interfaces.ts

@@ -79,15 +79,19 @@ export interface ToolCall {
 export interface Tool {
 export interface Tool {
   type: string;
   type: string;
   function: {
   function: {
-    name: string;
-    description: string;
-    parameters: {
-      type: string;
-      required: string[];
-      properties: {
+    name?: string;
+    description?: string;
+    type?: string;
+    parameters?: {
+      type?: string;
+      $defs?: any;
+      items?: any;
+      required?: string[];
+      properties?: {
         [key: string]: {
         [key: string]: {
-          type: string | string[];
-          description: string;
+          type?: string | string[];
+          items?: any;
+          description?: string;
           enum?: any[];
           enum?: any[];
         };
         };
       };
       };