The US military has agreed to deals with seven big tech firms as it expands its artificial intelligence capabilities.