This pull request primarily focuses on improving the src/aoai-simulated-api/generator/_generator_doc_intell.py file. The changes include refactoring the doc_intelligence_analyze and doc_intelligence_analyze_result functions to handle a broader range of requests, replacing hardcoded values with dynamic parameters, and introducing new functions to generate response content. Additionally, the .vscode/launch.json file was updated to include more worker and timeout settings.
This is a start, as additional functionality is needed to ensure an accurate response for all model options.
Here are the key changes:
Changes to the .vscode/launch.json file:
Added --workers=1 and --timeout=0 to the launch settings, which adjust the worker settings and remove the timeout limit for the application.
Changes to the src/aoai-simulated-api/generator/_generator_doc_intell.py file:
Refactoring and improvements:
Refactored the doc_intelligence_analyze function to handle requests for different models and versions, and replaced hardcoded values with dynamic parameters.
Refactored the doc_intelligence_analyze_result function to use dynamic parameters and generate response content based on the original request.
New functions:
Added datetime_handler function to handle datetime objects during JSON serialization.
Added build_result function to generate response content based on the original request. This function uses the lorem library to generate a string of words for the response content.
Removed:
Removed analyze-receipt-result.json as functionality is included in refactored doc_intelligence_analyze_result and build_result functions.
This pull request primarily focuses on improving the
src/aoai-simulated-api/generator/_generator_doc_intell.py
file. The changes include refactoring thedoc_intelligence_analyze
anddoc_intelligence_analyze_result
functions to handle a broader range of requests, replacing hardcoded values with dynamic parameters, and introducing new functions to generate response content. Additionally, the.vscode/launch.json
file was updated to include more worker and timeout settings.This is a start, as additional functionality is needed to ensure an accurate response for all model options.
Here are the key changes:
Changes to the
.vscode/launch.json
file:--workers=1
and--timeout=0
to the launch settings, which adjust the worker settings and remove the timeout limit for the application.Changes to the
src/aoai-simulated-api/generator/_generator_doc_intell.py
file:Refactoring and improvements:
doc_intelligence_analyze
function to handle requests for different models and versions, and replaced hardcoded values with dynamic parameters.doc_intelligence_analyze_result
function to use dynamic parameters and generate response content based on the original request.New functions:
datetime_handler
function to handle datetime objects during JSON serialization.build_result
function to generate response content based on the original request. This function uses thelorem
library to generate a string of words for the response content.Removed:
analyze-receipt-result.json
as functionality is included in refactoreddoc_intelligence_analyze_result
andbuild_result
functions.