genai.utils module#
- genai.utils.get_service_action_metadata(service_method)[source]#
Retrieve metadata for arbitrary service’s method. For instance which endpoint is being used.
Example:
from genai import Credentials, Client from genai.utils import get_service_action_metadata credentials = Credentials.from_env() client = Client(credentials=credentials) metadata = get_service_action_metadata(client.text.tokenization.create)
- Parameters:
service_method (Callable) –
- Return type:
ServiceActionMetadata