Skip to content

Commit 31928cf

Browse files
abhizipstackclaude
andcommitted
fix: revert generate_formula param back to model_name
Keep original parameter name — model_name is the correct terminology for this endpoint, not file_name. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0e5939b commit 31928cf

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

backend/backend/core/routers/transformation/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
path("<str:file_name>/set-presentation", set_model_presentation, name="set-no-code-model-presentation"),
2222
path("<str:file_name>/columns", get_transformation_columns, name="get-transformation-columns"),
2323
path("<str:file_name>/supported_references", get_supported_models, name="get-supported-reference-models"),
24-
path("<str:file_name>/generate_formula", generate_formula, name="generate-formula"),
24+
path("<str:model_name>/generate_formula", generate_formula, name="generate-formula"),
2525
path("<str:file_name>", save_model_file, name="save-no-code-model-file"),
2626
]

backend/backend/core/routers/transformation/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,13 @@ def get_supported_models(request: Request, project_id: str, file_name: str) -> R
211211
@api_view([HTTPMethods.POST])
212212
@handle_http_request
213213
@handle_permission
214-
def generate_formula(request: Request, project_id: str, file_name: str) -> Response:
214+
def generate_formula(request: Request, project_id: str, model_name: str) -> Response:
215215
# Generate Excel Formula based on the User prompt with OpenAi support
216216
user_prompt = request.data["user_prompt"]
217217
app = FormulaContext(project_id=project_id)
218218

219219
# Get schema details and construct the prompt
220-
schema_details = app.get_schema_details(file_name)
220+
schema_details = app.get_schema_details(model_name)
221221
constructed_prompt = app.construct_prompt(user_prompt, schema_details)
222222

223223
# Generate the formula

0 commit comments

Comments
 (0)