Pricing
get_pricing(service)
async
Returns the current pricing configuration for models (embeddings and generative).
Prices are in USD per 1000 tokens.
Parameters:
-
service(Annotated[PricingService, Depends(get_pricing_service)]) –The pricing service instance injected by FastAPI.
Returns:
-
PricingMapResponse(PricingMapResponse) –A dictionary containing the pricing for different models.
Raises:
-
TechnicalError–If there's an error retrieving the pricing configuration.
Source code in app/api/v1/endpoints/pricing.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | |