added a server manager
This commit is contained in:
@@ -9,3 +9,6 @@ __pycache__/
|
|||||||
.env
|
.env
|
||||||
*.log
|
*.log
|
||||||
/uploads
|
/uploads
|
||||||
|
server_manager.sh
|
||||||
|
server.log
|
||||||
|
server.pid
|
||||||
@@ -731,6 +731,7 @@ async def match_specific_receipts(request: MatchSpecificRequest, db: db_dependen
|
|||||||
match_responses = []
|
match_responses = []
|
||||||
for result in matching_results:
|
for result in matching_results:
|
||||||
# Get final tax amount from LLM analysis if available, otherwise use receipt's stated tax
|
# Get final tax amount from LLM analysis if available, otherwise use receipt's stated tax
|
||||||
|
if result.confidence_score > 0:
|
||||||
final_tax = result.receipt.tax
|
final_tax = result.receipt.tax
|
||||||
# if result.tax_analysis and "final_tax_amount" in result.tax_analysis:
|
# if result.tax_analysis and "final_tax_amount" in result.tax_analysis:
|
||||||
# final_tax = result.tax_analysis["final_tax_amount"]
|
# final_tax = result.tax_analysis["final_tax_amount"]
|
||||||
@@ -802,6 +803,7 @@ async def match_specific_receipts(request: MatchSpecificRequest, db: db_dependen
|
|||||||
AccountName=result.transaction.AccountName
|
AccountName=result.transaction.AccountName
|
||||||
if result.transaction
|
if result.transaction
|
||||||
else None,
|
else None,
|
||||||
|
Source=result.transaction.source if result.transaction else None,
|
||||||
)
|
)
|
||||||
match_responses.append(match_response)
|
match_responses.append(match_response)
|
||||||
|
|
||||||
|
|||||||
@@ -181,6 +181,7 @@ class MatchResponse(BaseModel):
|
|||||||
VendorName: Optional[str] = None
|
VendorName: Optional[str] = None
|
||||||
AccountId: Optional[str] = None
|
AccountId: Optional[str] = None
|
||||||
AccountName: Optional[str] = None
|
AccountName: Optional[str] = None
|
||||||
|
Source: Optional[str] = None
|
||||||
|
|
||||||
|
|
||||||
class MatchingResponse(BaseModel):
|
class MatchingResponse(BaseModel):
|
||||||
|
|||||||
Reference in New Issue
Block a user