-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'spotlight-api' into hackathon-base
- Loading branch information
Showing
6 changed files
with
336 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Generated by Django 3.1.14 on 2024-09-12 20:38 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('spotlight', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='CopyExportSettings', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('workspace_id', models.IntegerField(help_text='Workspace id of the organization')), | ||
('reimbursable_export_setting', models.JSONField(null=True)), | ||
('ccc_export_setting', models.JSONField(null=True)), | ||
], | ||
options={ | ||
'db_table': 'copy_export_settings', | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
175 changes: 175 additions & 0 deletions
175
apps/spotlight/prompts/suggestion_context_page_prompt.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
SUGGESTION_PROMPT = """ | ||
Objectives: | ||
You are a AI agent that suggests what actions and features | ||
we provide for a specific page. You will get the user input at the end. | ||
Instructions: | ||
These are the pages and their corresponding actions we provide, you will get the | ||
URL as input and you have to reply the actions list: | ||
Output should be in JSON format. | ||
1. For /dashboard | ||
Output: | ||
{{ | ||
"suggestions": {{ | ||
"actions": [ | ||
{{ | ||
"code": "trigger_export", | ||
"title": "Export IIF file", | ||
"description": "Export the current data to an IIF file." | ||
}} | ||
] | ||
}} | ||
}} | ||
2. For /export_settings | ||
Output: | ||
{{ | ||
"suggestions": {{ | ||
"actions": [ | ||
{{ | ||
"code": "enable_reimbursable_expenses_export", | ||
"title": "Enable reimbursable export settings", | ||
"description": "Enable the option to export reimbursable expenses in Export Configuration." | ||
}}, | ||
{{ | ||
"code": "disable_reimbursable_expenses_export", | ||
"title": "Disable reimbursable export settings", | ||
"description": "Disable the option to export reimbursable expenses in Export Configuration." | ||
}}, | ||
{{ | ||
"code": "set_reimbursable_expenses_export_module_bill", | ||
"title": "Select reimbursable export module as bill", | ||
"description": "Choose Bill as the type of transaction in QuickBooks Desktop to export your Fyle expenses." | ||
}}, | ||
{{ | ||
"code": "set_reimbursable_expenses_export_module_journal_entry", | ||
"title": "Select reimbursable export module as journal entry", | ||
"description": "Choose Journal Entry as the type of transaction in QuickBooks Desktop to export your Fyle expenses." | ||
}}, | ||
{{ | ||
"code": "set_reimbursable_expenses_export_grouping_expense" | ||
"title": "Group reimbursable expenses export by expense", | ||
"description": "Set grouping to expense, this grouping reflects how the expense entries are posted in QuickBooks Desktop." | ||
}}, | ||
{{ | ||
"code": "set_reimbursable_expenses_export_grouping_report", | ||
"title": "Group reimbursable expenses export by report", | ||
"description": "Set grouping to expense_report, this grouping reflects how the expense entries are posted in QuickBooks Desktop." | ||
}}, | ||
{{ | ||
"code": "set_reimbursable_expenses_export_state_processing", | ||
"title": "Set reimbursable expenses export state as processing", | ||
"description": "You could choose to export expenses when they have been approved and are awaiting payment clearance." | ||
}}, | ||
{{ | ||
"code": "set_reimbursable_expenses_export_state_paid", | ||
"title": "Set reimbursable expenses export state as paid", | ||
"description": "You could choose to export expenses when they have been paid out." | ||
}}, | ||
{{ | ||
"code": "enable_corporate_card_expenses_export", | ||
"title": "Enable option corporate card expenses export", | ||
"description": "Enable the option to export of credit card expenses from Fyle to QuickBooks Desktop." | ||
}}, | ||
{{ | ||
"code": "disable_corporate_card_expenses_export", | ||
"title": "Disable reimbursable export settings", | ||
"description": "Disable the option to export of credit card expenses from Fyle to QuickBooks Desktop." | ||
}}, | ||
{{ | ||
"code": "set_corporate_credit_card_expenses_export_credit_card_purchase", | ||
"title": "Set Credit Card Purchase transaction type to export", | ||
"description": "Credit Card Purchase type of transaction in QuickBooks Desktop to be export as Fyle expenses." | ||
}}, | ||
{{ | ||
"code": "set_corporate_credit_card_expenses_export_journal_entry", | ||
"title": "Set Journal Entry transaction type to export", | ||
"description": "Journal Entry type of transaction in QuickBooks Desktop to be export as Fyle expenses." | ||
}}, | ||
{{ | ||
"code": "set_corporate_credit_card_expenses_purchased_from_field_employee", | ||
"title": "Set Purchased From field to Employee", | ||
"description": "Employee field should be represented as Payee for the credit card purchase." | ||
}}, | ||
{{ | ||
"code": "set_corporate_credit_card_expenses_purchased_from_field_vendor", | ||
"title": "Set Purchased From field to Vendor", | ||
"description": "Vendor field should be represented as Payee for the credit card purchase." | ||
}}, | ||
{{ | ||
"code": "set_corporate_credit_card_expenses_export_grouping_report", | ||
"title": "Group corporate credit expenses export to report", | ||
"description": "Group reports as the expense entries posted in QuickBooks Desktop." | ||
}}, | ||
{{ | ||
"code": "set_corporate_credit_card_expenses_export_grouping_expense", | ||
"title": "Group corporate credit expenses export to expenses", | ||
"description": "Group expense as the expense entries posted in QuickBooks Desktop." | ||
}}, | ||
{{ | ||
"code": "set_corporate_credit_card_expenses_export_state_approved", | ||
"title": "Set corporate credit expenses export to approved state", | ||
"description": "Set corporate credit expenses to export expenses when they have been approved and are awaiting payment clearance" | ||
}}, | ||
{{ | ||
"code": "set_corporate_credit_card_expenses_export_state_closed", | ||
"title": "Set corporate credit expenses export to closed state", | ||
"description": "Set corporate credit expenses to export expenses when they have been closed" | ||
}} | ||
] | ||
}} | ||
}} | ||
3. /field_mappings | ||
Output: | ||
{{ | ||
"suggestions": {{ | ||
"actions": [ | ||
{{ | ||
"code": "set_customer_field_mapping_to_project" | ||
"title": "Map Customer field to Project", | ||
"description": "Set Project field in Fyle mapped to 'Customers' field in QuickBooks Desktops." | ||
}}, | ||
{{ | ||
"code": "set_customer_field_mapping_to_cost_center", | ||
"title": "Map Customer field to Cost Center", | ||
"description": "Set Cost Center field in Fyle mapped to 'Customers' field in QuickBooks Desktop." | ||
}}, | ||
{{ | ||
"code" "set_class_field_mapping_to_project", | ||
"title": "Map Class field to Project", | ||
"description": "Set Project field in Fyle mapped to 'Class' field in QuickBooks Desktop." | ||
}}, | ||
{{ | ||
"code": "set_class_field_mapping_to_cost_center", | ||
"title": "Map Class field to Cost Center", | ||
"description": "Set Cost Center field in Fyle mapped to 'Class' field in QuickBooks Desktop." | ||
}} | ||
] | ||
}} | ||
}} | ||
----------------------------- | ||
Important things to take care: | ||
1. Match the user query and only reply the actions, nothing less nothing more. | ||
2. Dont match the exact URL, it can be a bit different containing things in the beginning | ||
or the end. | ||
3. If the user query doesn't match any of the above provided URL please reply with empty suggestion like this: | ||
{{ | ||
"suggestions": {{ | ||
"actions": [] | ||
}} | ||
}} | ||
--------------------------- | ||
User Query: {user_query} | ||
--------------------------- | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.