JimGPT
JimGPT · GPT アクション
FastAPI
GET /Hello WorldPOST /v1/get_meal_planGet Meal PlanPOST /v1/reroll_mealReroll Single Meal
元の API スキーマ
{
"openapi": "3.1.0",
"info": {
"title": "FastAPI",
"version": "0.1.0"
},
"servers": [
{
"url": "https://myaichef-api-production.up.railway.app"
}
],
"paths": {
"/": {
"get": {
"summary": "Hello World",
"operationId": "hello_world__get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/v1/get_meal_plan": {
"post": {
"summary": "Get Meal Plan",
"operationId": "get_meal_plan_v1_get_meal_plan_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenerateMealRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v1/reroll_meal": {
"post": {
"summary": "Reroll Single Meal",
"operationId": "reroll_single_meal_v1_reroll_meal_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RerollMealRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"DietaryRestriction": {
"type": "string",
"enum": [
"vegetarian",
"vegan",
"gluten-free",
"dairy-free",
"nut-free"
],
"title": "DietaryRestriction"
},
"FitnessActivity": {
"type": "string",
"enum": [
"sedentary",
"light",
"moderate",
"active",
"very active"
],
"title": "FitnessActivity"
},
"Gender": {
"type": "string",
"enum": [
"male",
"female"
],
"title": "Gender"
},
"GenerateMealRequest": {
"properties": {
"restricted_budget": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Restricted Budget",
"description": "Budget in USD",
"default": 10
},
"current_weight": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Current Weight",
"description": "Current weight in lbs",
"default": 150
},
"goal": {
"anyOf": [
{
"$ref": "#/components/schemas/Goal"
},
{
"type": "null"
}
],
"description": "The fitness goal most resembling the one requested. Must be one within the enum",
"default": "maintain"
},
"favorite_meals": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"title": "Favorite Meals",
"description": "Favorite meals",
"default": []
},
"time_preference": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Time Preference",
"description": "Time preference in seconds",
"default": 1200
},
"age": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Age",
"description": "Age in years",
"default": 25
},
"height_ft": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height Ft",
"description": "Height in feet",
"default": 5
},
"height_in": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Height In",
"description": "Height in inches",
"default": 10
},
"gender": {
"anyOf": [
{
"$ref": "#/components/schemas/Gender"
},
{
"type": "null"
}
],
"description": "Gender",
"default": "male"
},
"fitness_activity": {
"anyOf": [
{
"$ref": "#/components/schemas/FitnessActivity"
},
{
"type": "null"
}
],
"description": "The fitness level most resembling the one requested. Must be one within the enum.",
"default": "active"
},
"user_restrictions": {
"anyOf": [
{
"items": {
"$ref": "#/components/schemas/DietaryRestriction"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "User Restrictions",
"description": "List of user restrictions that need to be satisfied. Must be one within the enum.",
"default": []
},
"user_taste_palette": {
"anyOf": [
{
"items": {
"$ref": "#/components/schemas/TastePalette"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "User Taste Palette",
"description": "List of user taste palette that need to be satisfied. Must be one within the enum.",
"default": [
"sweet",
"salty",
"sour",
"bitter",
"umami"
]
}
},
"type": "object",
"title": "GenerateMealRequest"
},
"Goal": {
"type": "string",
"enum": [
"lose",
"maintain",
"gain"
],
"title": "Goal"
},
"HTTPValidationError": {
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
},
"RerollMealRequest": {
"properties": {
"meal_plan": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"title": "Meal Plan",
"default": []
},
"meal_to_exclude": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
],
"title": "Meal To Exclude",
"default": {}
},
"restricted_budget": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Restricted Budget",
"default": 10
},
"target_protein": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Target Protein",
"default": 0
},
"target_carbs": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Target Carbs",
"default": 0
},
"target_fat": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Target Fat",
"default": 0
},
"target_calories": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"title": "Target Calories",
"default": 0
}
},
"type": "object",
"title": "RerollMealRequest"
},
"TastePalette": {
"type": "string",
"enum": [
"sweet",
"salty",
"sour",
"bitter",
"umami"
],
"title": "TastePalette"
},
"ValidationError": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
}
}
}
}