desc_pool = DescriptorPool(reflection_db)
nlp_service = desc_pool.FindServiceByName('caikit.runtime.Nlp.NlpService')
print('Available methods:')
for m in nlp_service.methods:
print(m.name)
method_desc = nlp_service.FindMethodByName('TextGenerationTaskPredict')
for field in method_desc.input_type.fields:
print(f'{field.name}, {field.type}, default: {field.default_value}')