An AI startup that functions as a sort of paralegal for personal injury lawyers hosted a splashy grand opening for its new headquarters in downtown San Francisco, the latest illustration that the artificial intelligence sector is helping to bring back the city’s battered office market.