routes; } if ( isset( $this->routes[ $route_path ] ) ) { return $this->routes[ $route_path ]; } } public function register( Route_Interface $instance ) { $this->routes[ $instance::get_name() ] = $instance; } public function _rest_init() { // Assistants services. new Assistants_Get(); new Assistants_Edit(); new Assistants_Post(); new Assistants_Delete(); // Assistants Vector Stores services. new Assistants_Vector_Stores_Post(); new Assistants_Vector_Stores_Get(); new Assistants_Vector_Stores_Edit(); new Assistants_Vector_Stores_Delete(); // Assistants Files services. new Assistants_Files_Post(); new Assistants_Files_Get(); new Assistants_Files_Delete(); new Assistants_Files_Edit(); new Assistants_Files_Example_File(); // Assistants Messages services. new Assistants_Messages_Post(); new Assistants_Messages_Get(); // Assistants Threads services. new Assistants_Threads_Post(); new Assistants_Threads_Get(); // Chat services. new Chat(); // Completions services. new Completions(); // Images services. new Images(); } public static function instance() { if ( is_null( self::$instance ) ) { self::$instance = new self(); } return self::$instance; } }