Added use_strict optional.
This commit is contained in:
		
							parent
							
								
									a73cfc95ed
								
							
						
					
					
						commit
						44c7063033
					
				
							
								
								
									
										29
									
								
								tools.h
									
									
									
									
									
								
							
							
						
						
									
										29
									
								
								tools.h
									
									
									
									
									
								
							| @ -119,6 +119,8 @@ struct json_object *tool_description_web_search_news() { | ||||
|                          json_object_new_boolean(0)); | ||||
| 
 | ||||
|   json_object_object_add(function, "parameters", parameters); | ||||
| 
 | ||||
|   if(get_use_strict()) | ||||
|   json_object_object_add(function, "strict", json_object_new_boolean(get_use_strict())); | ||||
| 
 | ||||
|   json_object_object_add(root, "function", function); | ||||
| @ -173,6 +175,8 @@ struct json_object *tool_description_web_search() { | ||||
|                          json_object_new_boolean(0)); | ||||
| 
 | ||||
|   json_object_object_add(function, "parameters", parameters); | ||||
| 
 | ||||
|   if(get_use_strict()) | ||||
|   json_object_object_add(function, "strict", json_object_new_boolean(get_use_strict())); | ||||
| 
 | ||||
|   json_object_object_add(root, "function", function); | ||||
| @ -224,6 +228,8 @@ struct json_object *tool_description_db_get() { | ||||
|                          json_object_new_boolean(0)); | ||||
| 
 | ||||
|   json_object_object_add(function, "parameters", parameters); | ||||
| 
 | ||||
|   if(get_use_strict()) | ||||
|   json_object_object_add(function, "strict", json_object_new_boolean(get_use_strict())); | ||||
| 
 | ||||
|   json_object_object_add(root, "function", function); | ||||
| @ -274,6 +280,8 @@ struct json_object *tool_description_db_query() { | ||||
|                          json_object_new_boolean(0)); | ||||
| 
 | ||||
|   json_object_object_add(function, "parameters", parameters); | ||||
| 
 | ||||
|   if(get_use_strict()) | ||||
|   json_object_object_add(function, "strict", json_object_new_boolean(get_use_strict())); | ||||
| 
 | ||||
|   json_object_object_add(root, "function", function); | ||||
| @ -331,6 +339,8 @@ struct json_object *tool_description_db_set() { | ||||
|                          json_object_new_boolean(0)); | ||||
| 
 | ||||
|   json_object_object_add(function, "parameters", parameters); | ||||
| 
 | ||||
|   if(get_use_strict()) | ||||
|   json_object_object_add(function, "strict", json_object_new_boolean(get_use_strict())); | ||||
| 
 | ||||
|   json_object_object_add(root, "function", function); | ||||
| @ -471,6 +481,8 @@ struct json_object *tool_description_chdir() { | ||||
|                          json_object_new_boolean(0)); | ||||
| 
 | ||||
|   json_object_object_add(function, "parameters", parameters); | ||||
| 
 | ||||
|   if(get_use_strict()) | ||||
|   json_object_object_add(function, "strict", json_object_new_boolean(get_use_strict())); | ||||
| 
 | ||||
|   json_object_object_add(root, "function", function); | ||||
| @ -511,6 +523,8 @@ struct json_object *tool_description_index_source_directory() { | ||||
|                          json_object_new_boolean(0)); | ||||
| 
 | ||||
|   json_object_object_add(function, "parameters", parameters); | ||||
| 
 | ||||
|   if(get_use_strict()) | ||||
|   json_object_object_add(function, "strict", json_object_new_boolean(get_use_strict())); | ||||
| 
 | ||||
|   json_object_object_add(root, "function", function); | ||||
| @ -554,6 +568,8 @@ struct json_object *tool_description_linux_terminal_interactive() { | ||||
|                          json_object_new_boolean(0)); | ||||
| 
 | ||||
|   json_object_object_add(function, "parameters", parameters); | ||||
| 
 | ||||
|   if(get_use_strict()) | ||||
|   json_object_object_add(function, "strict", json_object_new_boolean(get_use_strict())); | ||||
| 
 | ||||
|   json_object_object_add(root, "function", function); | ||||
| @ -597,6 +613,8 @@ struct json_object *tool_description_directory_rglob() { | ||||
|                          json_object_new_boolean(0)); | ||||
| 
 | ||||
|   json_object_object_add(function, "parameters", parameters); | ||||
| 
 | ||||
|   if(get_use_strict()) | ||||
|   json_object_object_add(function, "strict", json_object_new_boolean(get_use_strict())); | ||||
| 
 | ||||
|   json_object_object_add(root, "function", function); | ||||
| @ -636,6 +654,8 @@ struct json_object *tool_description_read_file() { | ||||
|                      json_object_new_boolean(0)); | ||||
| 
 | ||||
|   json_object_object_add(function, "parameters", parameters); | ||||
| 
 | ||||
|   if(get_use_strict()) | ||||
|   json_object_object_add(function, "strict", json_object_new_boolean(get_use_strict())); | ||||
| 
 | ||||
|   json_object_object_add(root, "function", function); | ||||
| @ -688,6 +708,8 @@ struct json_object *tool_description_write_file() { | ||||
|                          json_object_new_boolean(0)); | ||||
| 
 | ||||
|   json_object_object_add(function, "parameters", parameters); | ||||
| 
 | ||||
|   if(get_use_strict()) | ||||
|   json_object_object_add(function, "strict", json_object_new_boolean(get_use_strict())); | ||||
| 
 | ||||
|   json_object_object_add(root, "function", function); | ||||
| @ -986,6 +1008,7 @@ struct json_object *tool_description_http_get() { | ||||
|                      json_object_new_boolean(0)); | ||||
| 
 | ||||
|   json_object_object_add(function, "parameters", parameters); | ||||
|   if(get_use_strict()) | ||||
|   json_object_object_add(function, "strict", json_object_new_boolean(get_use_strict())); | ||||
| 
 | ||||
|   json_object_object_add(root, "function", function); | ||||
| @ -1028,6 +1051,8 @@ struct json_object *tool_description_directory_glob() { | ||||
|                          json_object_new_boolean(0)); | ||||
| 
 | ||||
|   json_object_object_add(function, "parameters", parameters); | ||||
| 
 | ||||
|   if(get_use_strict()) | ||||
|   json_object_object_add(function, "strict", json_object_new_boolean(get_use_strict())); | ||||
| 
 | ||||
|   json_object_object_add(root, "function", function); | ||||
| @ -1067,6 +1092,8 @@ struct json_object *tool_description_linux_terminal() { | ||||
|                      json_object_new_boolean(0)); | ||||
| 
 | ||||
|   json_object_object_add(function, "parameters", parameters); | ||||
| 
 | ||||
|   if(get_use_strict()) | ||||
|   json_object_object_add(function, "strict", json_object_new_boolean(get_use_strict())); | ||||
| 
 | ||||
|   json_object_object_add(root, "function", function); | ||||
| @ -1129,6 +1156,8 @@ struct json_object *tool_description_mkdir() { | ||||
|                          json_object_new_boolean(0)); | ||||
| 
 | ||||
|   json_object_object_add(function, "parameters", parameters); | ||||
| 
 | ||||
|   if(get_use_strict()) | ||||
|   json_object_object_add(function, "strict", json_object_new_boolean(get_use_strict())); | ||||
| 
 | ||||
|   json_object_object_add(root, "function", function); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user