Better.
This commit is contained in:
		
							parent
							
								
									387d5bb6a2
								
							
						
					
					
						commit
						f57a174d0a
					
				
							
								
								
									
										2
									
								
								chat.h
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								chat.h
									
									
									
									
									
								
							| @ -72,8 +72,6 @@ char *chat_json(char *role, char *message) { | |||||||
|     json_object_object_add(root_object, "max_tokens", json_object_new_int(prompt_max_tokens)); |     json_object_object_add(root_object, "max_tokens", json_object_new_int(prompt_max_tokens)); | ||||||
|     json_object_object_add(root_object, "temperature", json_object_new_double(prompt_temperature)); |     json_object_object_add(root_object, "temperature", json_object_new_double(prompt_temperature)); | ||||||
| 
 | 
 | ||||||
|     printf("%s\n", json_object_to_json_string_ext(root_object, JSON_C_TO_STRING_PRETTY)); |  | ||||||
| 
 |  | ||||||
|     return (char *)json_object_to_json_string_ext(root_object, JSON_C_TO_STRING_PRETTY); |     return (char *)json_object_to_json_string_ext(root_object, JSON_C_TO_STRING_PRETTY); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								tools.h
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								tools.h
									
									
									
									
									
								
							| @ -33,8 +33,6 @@ struct json_object *tools_descriptions() { | |||||||
|     json_object_array_add(root, tool_description_write_file()); |     json_object_array_add(root, tool_description_write_file()); | ||||||
|      |      | ||||||
| 
 | 
 | ||||||
|     char * result =  strdup(json_object_to_json_string_ext(root, JSON_C_TO_STRING_PRETTY)); |  | ||||||
|     printf("%s\n", result); |  | ||||||
|     return root; |     return root; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user