banko-ai-assistant 1.0.11__tar.gz → 1.0.13__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {banko_ai_assistant-1.0.11/banko_ai_assistant.egg-info → banko_ai_assistant-1.0.13}/PKG-INFO +1 -1
- banko_ai_assistant-1.0.13/banko_ai/__main__.py +23 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/ai_providers/watsonx_provider.py +232 -21
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/config/settings.py +24 -7
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/utils/cache_manager.py +1 -1
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/vector_search/enrichment.py +11 -71
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/vector_search/generator.py +56 -82
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/vector_search/search.py +43 -1
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/web/app.py +166 -73
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13/banko_ai_assistant.egg-info}/PKG-INFO +1 -1
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/pyproject.toml +1 -1
- banko_ai_assistant-1.0.11/banko_ai/__main__.py +0 -10
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/LICENSE +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/MANIFEST.in +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/README.md +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/__init__.py +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/ai_providers/__init__.py +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/ai_providers/aws_provider.py +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/ai_providers/base.py +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/ai_providers/factory.py +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/ai_providers/gemini_provider.py +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/ai_providers/openai_provider.py +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/cli.py +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/config/__init__.py +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/Anallytics.png +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/Graph.png +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/Graph2.png +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/ai-status.png +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/banko-ai-assistant-watsonx.gif +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/banko-db-ops.png +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/banko-response.png +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/cache-stats.png +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard.png +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/0dbda187ceb472a466dff54b7015b1d4.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/10903-7f8736e237ced107.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/10966-809952783184ae4b.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/13351-8a7dda060266efff.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/1342-c79d3d17da82f23c.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/16142-bdecf7bfdd6d70ae.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/16550-e89f65017860221d.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/17492-942c70b114fdcce1.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/18352-481d67e871cc6985.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/18555-0d9763eb744f7a77.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/19437-575ba467ea85e866.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/1aca1669c3b4a07f0966c4733c939d6d.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/20126-602c15db592cf3c4.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/20224-b6de2c08cc8ad497.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/2029a63f9af76541f860b6a6a4ec0c90.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/21662-1214728138c72aa2.css +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/22517-5f7ab2631d424b77.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/23019-be3b8956cee94725.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/26067-cb77f2673c5f757c.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/27405-880a12623820964d.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/27503-82078c18034012ed.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/28090-8e4b5fd6c88f8eb2.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/2c66dacf04db64cc1099835f2e2328d5.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/30090868cb2b559a7093999fec5fbcc8.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/30102-608e861dccc907f1.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/31600-ca2e152d871d51d5.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/31d5156a9cc5fe5fd780c2d9e59db98f.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/34713-54729fd9c7517d50.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/35074-d765c14dc3e8eafc.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/38230-4d6eb1a608eecdeb.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/40566-e2dbb4226dd2ab42.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/42298-668aa166e1146c6c.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/43203-3a1e46e5259313c8.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/44429-6534f772a6bd895b.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/48327-48fb70091d7ac731.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/49923-dc71193d54a0b99c.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/49c3cac3c5a09ca104a2efea48536d14.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/50040-3c27b1fe14ca588b.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/5047473e06297bbccfae9c43ca36bd93.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/51531-253e8d8f8f527d9c.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/58103-d6be57f2d624e7b4.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/58822-d1779ebe9d4fab59.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/61b440e4366b35d7213172be53d3864e.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/61d121a699367070f3988f633ed6ac7d.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/65610-15f55d146aa3cc6f.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/65662-2b7065d2ddcf6a0c.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/67631-9d4d7f4aab06e79c.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/68445-8aae26e83c03d9bc.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/6863-da15e99ca946f07a.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/71526-518cf6126a32651b.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/72268-8f69a6e8585b9af2.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/76f1a52015cf2a243ed085586f3d44e8.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/80538-65bd348271403336.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/81505-387f6ddb644ae967.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/8151-1a0cf04ea45ad513.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/83119-1cf7ca2f5ba0e1ab.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/83485-27ce97f9e7369ed7.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/8575-e1977ceb3b34da9c.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/8962-664b3c9b21ec2e0f.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/90123-40fd5c2d5dc1c0a1.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/91846-55cc5635c18159a0.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/91936-56d11562a38b3f77.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/96833-fbcb1ab8436924d4.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/99246-889e96fc0a42e07a.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/99961-ee8d9a1207a9db7a.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/DefaultPinRep-78e567622e9cb382.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/DesktopUnauthPageWrapper-26b3c2c050f09d27.css +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/DesktopUnauthPageWrapper-a120f0b0faa773a2.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/KkWFeSURekXGycdprVC-UY6ED-ZF5ll2JCMiHhJE2Rk.js +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/MobileAndUnauthPinPage-0083f61f79e906d2.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/UnauthCloseupRelatedPins-d98c713ac2e141a7.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/[id]-87f8f6f1f81e3a8a.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/_client-49638f60bdf5658e.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/a7ee24644496b7a3131cd4e13b8c6edb.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/a8ada9395c00dffc8fb81a7b76bd34b5.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/abbf5a82906bef8c6be49ab38eaeea7c.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/ad910641231bb413f6a985e4e9961efb.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/anchor.html +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/b6083df3cfa26856caef114c51a8d21e.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/b957829ac112a8c28b313307e5ff0df6.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/bb2d3d28e3421d901d8d431c33f0c6ed.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/bb2d3d28e3421d901d8d431c33f0c6ed.png +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/c3031b4a938377789e00d3d2f3b2438c.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/client +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/ct.html +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/d03e6db9649ea3479b799d5a21008ac2.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/d3d38fd9aa0c808a28ff5bd9ae5b5576.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/de7cb9e198b4ebc9430824132ccfce2e.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/e4330b4a4e71a3f77dd0682b99037cad.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/ecdf72d4d54e70608e9416020f8ad67d.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/eef64355b9f10e89c355b138adbae1e9.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/enterprise.js +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/f1354f6bb993409ea12235a01a978936.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/f7c30e2615fe0e57d9ab6e41aac5e738.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/fa72fa1ae9bb3ec93f41595333d22d16.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/fb09ce3b0feb4931402867cf109cd618.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/i +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/locale-en_US-lite-js-d0d346142714beb1.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/login-3c695aa28fdc27a5.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/login-e161a84cea9cd0a3.css +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/packages-rich-snippet-LeafSnippet-b7f61038a4431021.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/polyfills-c5ca6e711f8975ec.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/recaptcha__en.js +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/repin-62bbd4d7c8e22f17.css +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/repin-d49f19d89ddd3cbe.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/runtime-505e4380476a458b.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/saved_resource(1).html +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/saved_resource(2).html +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/saved_resource.html +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/sdk(1).js +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/sdk.js +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/select.html +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/style +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/styles__ltr.css +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/unnamed.jpg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/vendor-react-76e71fd67c83934b.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/creditcard_files/visual-search-fe95849c7568d600.mjs +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/css/style.css +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/profilepic.jpeg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/query_watcher.png +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/roach-logo.svg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/static/watsonx-icon.svg +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/templates/base.html +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/templates/dashboard.html +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/templates/index.html +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/templates/login.html +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/utils/__init__.py +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/utils/database.py +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/utils/migration.py +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/vector_search/__init__.py +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/web/__init__.py +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/web/auth.py +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai_assistant.egg-info/SOURCES.txt +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai_assistant.egg-info/dependency_links.txt +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai_assistant.egg-info/entry_points.txt +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai_assistant.egg-info/requires.txt +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai_assistant.egg-info/top_level.txt +0 -0
- {banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/setup.cfg +0 -0
{banko_ai_assistant-1.0.11/banko_ai_assistant.egg-info → banko_ai_assistant-1.0.13}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: banko-ai-assistant
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.13
|
4
4
|
Summary: AI-powered expense analysis and RAG system with CockroachDB vector search and multi-provider AI support
|
5
5
|
Author-email: Virag Tripathi <virag.tripathi@gmail.com>
|
6
6
|
License-Expression: MIT
|
@@ -0,0 +1,23 @@
|
|
1
|
+
"""
|
2
|
+
Main entry point for Banko AI Assistant.
|
3
|
+
This matches the original app.py behavior.
|
4
|
+
"""
|
5
|
+
|
6
|
+
if __name__ == '__main__':
|
7
|
+
import os
|
8
|
+
from .web.app import create_app
|
9
|
+
|
10
|
+
print("🏦 === Banko AI Assistant Starting === 🏦")
|
11
|
+
|
12
|
+
# Create the Flask app
|
13
|
+
app = create_app()
|
14
|
+
|
15
|
+
# Get port from environment variable or default to 5000 (matching original)
|
16
|
+
port = int(os.environ.get("PORT", 5000))
|
17
|
+
|
18
|
+
print(f"🚀 Starting server on http://localhost:{port}")
|
19
|
+
print("🎉 Banko AI is ready to help with your finances!")
|
20
|
+
print("=" * 45)
|
21
|
+
|
22
|
+
# Run the app on all interfaces, using the configured port (matching original)
|
23
|
+
app.run(host='0.0.0.0', port=port, debug=True)
|
{banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/ai_providers/watsonx_provider.py
RENAMED
@@ -76,10 +76,64 @@ class WatsonxProvider(AIProvider):
|
|
76
76
|
limit: int = 10,
|
77
77
|
threshold: float = 0.7
|
78
78
|
) -> List[SearchResult]:
|
79
|
-
"""Search for expenses using vector similarity."""
|
80
|
-
|
81
|
-
|
82
|
-
|
79
|
+
"""Search for expenses using vector similarity - matches original implementation."""
|
80
|
+
try:
|
81
|
+
# Use the same simple search logic as the original watsonx.py
|
82
|
+
from sentence_transformers import SentenceTransformer
|
83
|
+
from sqlalchemy import create_engine, text
|
84
|
+
import json
|
85
|
+
|
86
|
+
# Database connection (matching original)
|
87
|
+
DB_URI = "cockroachdb://root@localhost:26257/defaultdb?sslmode=disable"
|
88
|
+
engine = create_engine(DB_URI)
|
89
|
+
|
90
|
+
# Generate embedding (matching original)
|
91
|
+
model = SentenceTransformer('all-MiniLM-L6-v2')
|
92
|
+
raw_embedding = model.encode(query)
|
93
|
+
search_embedding = json.dumps(raw_embedding.flatten().tolist())
|
94
|
+
|
95
|
+
# Use exact same query as original
|
96
|
+
search_query = text("""
|
97
|
+
SELECT
|
98
|
+
description,
|
99
|
+
merchant,
|
100
|
+
shopping_type,
|
101
|
+
expense_amount,
|
102
|
+
embedding <=> :search_embedding as similarity_score
|
103
|
+
FROM expenses
|
104
|
+
ORDER BY embedding <=> :search_embedding
|
105
|
+
LIMIT :limit
|
106
|
+
""")
|
107
|
+
|
108
|
+
with engine.connect() as conn:
|
109
|
+
results = conn.execute(search_query,
|
110
|
+
{'search_embedding': search_embedding, 'limit': limit})
|
111
|
+
search_results = [dict(row._mapping) for row in results]
|
112
|
+
|
113
|
+
# Convert to SearchResult objects
|
114
|
+
results_list = []
|
115
|
+
for result in search_results:
|
116
|
+
results_list.append(SearchResult(
|
117
|
+
expense_id="", # Original doesn't have expense_id
|
118
|
+
user_id="", # Original doesn't have user_id
|
119
|
+
description=result['description'],
|
120
|
+
merchant=result['merchant'],
|
121
|
+
amount=result['expense_amount'],
|
122
|
+
date="", # Original doesn't have date
|
123
|
+
similarity_score=result['similarity_score'],
|
124
|
+
metadata={
|
125
|
+
'shopping_type': result['shopping_type'],
|
126
|
+
'payment_method': 'Unknown', # Original doesn't have this
|
127
|
+
'recurring': False,
|
128
|
+
'tags': []
|
129
|
+
}
|
130
|
+
))
|
131
|
+
|
132
|
+
return results_list
|
133
|
+
|
134
|
+
except Exception as e:
|
135
|
+
print(f"Error in search_expenses: {e}")
|
136
|
+
return []
|
83
137
|
|
84
138
|
def get_available_models(self) -> List[str]:
|
85
139
|
"""Get list of available Watsonx models."""
|
@@ -240,6 +294,143 @@ class WatsonxProvider(AIProvider):
|
|
240
294
|
|
241
295
|
return "\n".join(recommendations) if recommendations else ""
|
242
296
|
|
297
|
+
def simple_rag_response(self, prompt: str, search_results: List[Dict[str, Any]]) -> str:
|
298
|
+
"""
|
299
|
+
Simple RAG response that matches the original implementation exactly.
|
300
|
+
Takes a prompt and list of dictionaries (like original search results).
|
301
|
+
"""
|
302
|
+
try:
|
303
|
+
print(f"\n🤖 SIMPLE WATSONX RAG:")
|
304
|
+
print(f"1. Query: '{prompt[:60]}...'")
|
305
|
+
|
306
|
+
# Check for cached response first
|
307
|
+
if self.cache_manager:
|
308
|
+
cached_response = self.cache_manager.get_cached_response(
|
309
|
+
prompt, search_results, "watsonx"
|
310
|
+
)
|
311
|
+
if cached_response:
|
312
|
+
print(f"2. ✅ Response cache HIT! Returning cached response")
|
313
|
+
return cached_response
|
314
|
+
print(f"2. ❌ Response cache MISS, generating fresh response")
|
315
|
+
else:
|
316
|
+
print(f"2. No cache manager available, generating fresh response")
|
317
|
+
|
318
|
+
# Generate financial insights and categorization analysis (matching original)
|
319
|
+
insights = self._get_financial_insights_from_dicts(search_results)
|
320
|
+
budget_recommendations = self._generate_budget_recommendations(insights, prompt)
|
321
|
+
|
322
|
+
# Prepare the search results context with enhanced analysis (matching original)
|
323
|
+
search_results_text = ""
|
324
|
+
if search_results:
|
325
|
+
search_results_text = "\n".join(
|
326
|
+
f"• **{result['shopping_type']}** at {result['merchant']}: ${result['expense_amount']} - {result['description']}"
|
327
|
+
for result in search_results
|
328
|
+
)
|
329
|
+
|
330
|
+
# Add financial summary (matching original)
|
331
|
+
if insights:
|
332
|
+
search_results_text += f"\n\n**📊 Financial Summary:**\n"
|
333
|
+
search_results_text += f"• Total Amount: **${insights['total_amount']:.2f}**\n"
|
334
|
+
search_results_text += f"• Number of Transactions: **{insights['num_transactions']}**\n"
|
335
|
+
search_results_text += f"• Average Transaction: **${insights['avg_transaction']:.2f}**\n"
|
336
|
+
if insights.get('top_category'):
|
337
|
+
cat, amt = insights['top_category']
|
338
|
+
search_results_text += f"• Top Category: **{cat}** (${amt:.2f})\n"
|
339
|
+
else:
|
340
|
+
search_results_text = "No specific expense records found for this query."
|
341
|
+
|
342
|
+
# Create optimized prompt (matching original)
|
343
|
+
enhanced_prompt = f"""You are Banko, a financial assistant. Answer based on this expense data:
|
344
|
+
|
345
|
+
Q: {prompt}
|
346
|
+
|
347
|
+
Data:
|
348
|
+
{search_results_text}
|
349
|
+
|
350
|
+
{budget_recommendations if budget_recommendations else ''}
|
351
|
+
|
352
|
+
Provide helpful insights with numbers, markdown formatting, and actionable advice."""
|
353
|
+
|
354
|
+
# Prepare messages for chat format (matching original)
|
355
|
+
messages = [
|
356
|
+
{
|
357
|
+
"role": "user",
|
358
|
+
"content": enhanced_prompt
|
359
|
+
}
|
360
|
+
]
|
361
|
+
|
362
|
+
# Call Watsonx API (matching original implementation)
|
363
|
+
print(f"3. 🔄 Calling Watsonx API...")
|
364
|
+
response = self._call_watsonx_api(messages)
|
365
|
+
print(f"4. ✅ Watsonx response generated successfully")
|
366
|
+
|
367
|
+
# Cache the response for future similar queries
|
368
|
+
if self.cache_manager and response:
|
369
|
+
# Estimate token usage (rough approximation)
|
370
|
+
prompt_tokens = len(enhanced_prompt.split()) * 1.3 # ~1.3 tokens per word
|
371
|
+
response_tokens = len(response.split()) * 1.3
|
372
|
+
|
373
|
+
self.cache_manager.cache_response(
|
374
|
+
prompt, response, search_results, "watsonx",
|
375
|
+
int(prompt_tokens), int(response_tokens)
|
376
|
+
)
|
377
|
+
print(f"5. ✅ Cached response (est. {int(prompt_tokens + response_tokens)} tokens)")
|
378
|
+
|
379
|
+
return response
|
380
|
+
|
381
|
+
except Exception as e:
|
382
|
+
error_msg = f"❌ Error generating Watsonx response: {str(e)}"
|
383
|
+
print(error_msg)
|
384
|
+
|
385
|
+
# Check if it's a network connectivity issue
|
386
|
+
if "Failed to resolve" in str(e) or "nodename nor servname provided" in str(e) or "Network connectivity issue" in str(e):
|
387
|
+
return f"""I apologize, but I'm experiencing network connectivity issues with IBM Watsonx AI.
|
388
|
+
|
389
|
+
**🔧 Troubleshooting suggestions:**
|
390
|
+
- Check your internet connection
|
391
|
+
- Try switching to AWS Bedrock by setting `AI_SERVICE=aws` in your environment
|
392
|
+
- Verify your network allows access to `iam.cloud.ibm.com`
|
393
|
+
|
394
|
+
**💡 Quick fix:** You can switch AI providers by running:
|
395
|
+
```bash
|
396
|
+
export AI_SERVICE=aws
|
397
|
+
```
|
398
|
+
|
399
|
+
(Network Error: {str(e)})"""
|
400
|
+
else:
|
401
|
+
return f"I apologize, but I'm experiencing technical difficulties with IBM Watsonx AI. Please try again later or consider switching to AWS Bedrock. (Error: {str(e)})"
|
402
|
+
|
403
|
+
def _get_financial_insights_from_dicts(self, search_results: List[Dict[str, Any]]) -> dict:
|
404
|
+
"""Generate financial insights from dictionary format (matching original)."""
|
405
|
+
if not search_results:
|
406
|
+
return {}
|
407
|
+
|
408
|
+
total_amount = sum(float(result['expense_amount']) for result in search_results)
|
409
|
+
categories = {}
|
410
|
+
merchants = {}
|
411
|
+
|
412
|
+
for result in search_results:
|
413
|
+
# Category analysis
|
414
|
+
category = result['shopping_type']
|
415
|
+
categories[category] = categories.get(category, 0) + float(result['expense_amount'])
|
416
|
+
|
417
|
+
# Merchant analysis
|
418
|
+
merchant = result['merchant']
|
419
|
+
merchants[merchant] = merchants.get(merchant, 0) + float(result['expense_amount'])
|
420
|
+
|
421
|
+
# Find top categories and merchants
|
422
|
+
top_category = max(categories.items(), key=lambda x: x[1]) if categories else None
|
423
|
+
top_merchant = max(merchants.items(), key=lambda x: x[1]) if merchants else None
|
424
|
+
|
425
|
+
return {
|
426
|
+
'total_amount': total_amount,
|
427
|
+
'num_transactions': len(search_results),
|
428
|
+
'avg_transaction': total_amount / len(search_results) if search_results else 0,
|
429
|
+
'categories': categories,
|
430
|
+
'top_category': top_category,
|
431
|
+
'top_merchant': top_merchant
|
432
|
+
}
|
433
|
+
|
243
434
|
def rag_response(
|
244
435
|
self,
|
245
436
|
query: str,
|
@@ -420,9 +611,21 @@ Provide helpful insights with numbers, markdown formatting, and actionable advic
|
|
420
611
|
print(f"2. ❌ Response cache MISS, generating fresh response")
|
421
612
|
else:
|
422
613
|
print(f"2. No cache manager available, generating fresh response")
|
423
|
-
|
614
|
+
|
615
|
+
# Initialize ai_response to avoid variable scope issues
|
616
|
+
ai_response = ""
|
617
|
+
|
618
|
+
# FIXED: Use AI with actual search results instead of bypassing it completely
|
619
|
+
print(f"🔍 DEBUG: Using AI with REAL search results for query: {query}")
|
620
|
+
if context:
|
621
|
+
print(f"🔍 DEBUG: Processing {len(context)} REAL search results for AI context")
|
622
|
+
for i, result in enumerate(context):
|
623
|
+
print(f"🔍 DEBUG: Real Result {i+1}: {result.merchant} - ${result.amount} - {result.description[:50]}...")
|
624
|
+
|
625
|
+
# Re-enable AI generation with real search results
|
626
|
+
if True: # Re-enabled AI generation with real data
|
424
627
|
# Return structured demo response if no API credentials
|
425
|
-
if not
|
628
|
+
if not self.api_key or not self.project_id:
|
426
629
|
ai_response = f"""## Financial Analysis for: "{query}"
|
427
630
|
|
428
631
|
### 📋 Transaction Details
|
@@ -438,21 +641,21 @@ I couldn't find any relevant expense records for your query. Please try:
|
|
438
641
|
- Time periods (e.g., "last month", "this week")
|
439
642
|
|
440
643
|
**Note**: I need API credentials to generate more detailed AI-powered insights."""
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
644
|
+
else:
|
645
|
+
# Generate financial insights from search results
|
646
|
+
insights = self._get_financial_insights(context)
|
647
|
+
budget_recommendations = self._generate_budget_recommendations(insights, query)
|
648
|
+
|
649
|
+
# Create table text from search results
|
650
|
+
table_text = ""
|
651
|
+
if context:
|
652
|
+
table_text = "\n".join([
|
653
|
+
f"• **{result.metadata.get('shopping_type', 'Unknown')}** at {result.merchant}: ${result.amount} ({result.metadata.get('payment_method', 'Unknown')}) - {result.description}"
|
654
|
+
for result in context
|
655
|
+
])
|
656
|
+
|
657
|
+
# Create context text with financial summary
|
658
|
+
context_text = f"""**📊 Financial Summary:**
|
456
659
|
• Total Amount: ${insights.get('total_amount', 0):.2f}
|
457
660
|
• Number of Transactions: {insights.get('num_transactions', 0)}
|
458
661
|
• Average Transaction: ${insights.get('avg_transaction', 0):.2f}
|
@@ -463,6 +666,14 @@ I couldn't find any relevant expense records for your query. Please try:
|
|
463
666
|
{budget_recommendations if budget_recommendations else '• Consider reviewing your spending patterns regularly' + chr(10) + '• Set up budget alerts for high-value categories'}
|
464
667
|
|
465
668
|
**Note**: I can see {len(context)} relevant expense records, but I need API credentials to generate more detailed AI-powered insights."""
|
669
|
+
|
670
|
+
ai_response = f"""## Financial Analysis for: "{query}"
|
671
|
+
|
672
|
+
### 📋 Transaction Details
|
673
|
+
{table_text}
|
674
|
+
|
675
|
+
### 📊 Financial Summary
|
676
|
+
{context_text}"""
|
466
677
|
else:
|
467
678
|
# Make actual Watsonx API call with enhanced prompt (copied from original)
|
468
679
|
try:
|
@@ -60,20 +60,37 @@ class Config:
|
|
60
60
|
@classmethod
|
61
61
|
def from_env(cls) -> "Config":
|
62
62
|
"""Create configuration from environment variables."""
|
63
|
-
# Database configuration
|
64
|
-
database_url = os.getenv("DATABASE_URL", "cockroachdb://root@localhost:26257/
|
63
|
+
# Database configuration - match original app.py
|
64
|
+
database_url = os.getenv("DATABASE_URL", "cockroachdb://root@localhost:26257/defaultdb?sslmode=disable")
|
65
65
|
|
66
66
|
# Parse database URL for individual components
|
67
67
|
db_host = os.getenv("DATABASE_HOST", "localhost")
|
68
68
|
db_port = int(os.getenv("DATABASE_PORT", "26257"))
|
69
|
-
db_name = os.getenv("DATABASE_NAME", "
|
69
|
+
db_name = os.getenv("DATABASE_NAME", "defaultdb") # Match original
|
70
70
|
db_user = os.getenv("DATABASE_USER", "root")
|
71
71
|
db_password = os.getenv("DATABASE_PASSWORD", "")
|
72
72
|
ssl_mode = os.getenv("DATABASE_SSL_MODE", "disable")
|
73
73
|
|
74
|
-
# AI Service configuration
|
74
|
+
# AI Service configuration - match original app.py
|
75
75
|
ai_service = os.getenv("AI_SERVICE", "watsonx").lower()
|
76
76
|
|
77
|
+
# Try to load from config.py like the original app.py does
|
78
|
+
try:
|
79
|
+
import sys
|
80
|
+
# Add parent directory to path to import config.py
|
81
|
+
parent_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
82
|
+
if parent_dir not in sys.path:
|
83
|
+
sys.path.insert(0, parent_dir)
|
84
|
+
from config import WATSONX_API_KEY, WATSONX_PROJECT_ID, WATSONX_MODEL_ID
|
85
|
+
watsonx_api_key = WATSONX_API_KEY
|
86
|
+
watsonx_project_id = WATSONX_PROJECT_ID
|
87
|
+
watsonx_model = WATSONX_MODEL_ID
|
88
|
+
except ImportError:
|
89
|
+
# Fall back to environment variables
|
90
|
+
watsonx_api_key = os.getenv("WATSONX_API_KEY")
|
91
|
+
watsonx_project_id = os.getenv("WATSONX_PROJECT_ID")
|
92
|
+
watsonx_model = os.getenv("WATSONX_MODEL", "openai/gpt-oss-120b")
|
93
|
+
|
77
94
|
return cls(
|
78
95
|
# Database
|
79
96
|
database_url=database_url,
|
@@ -92,9 +109,9 @@ class Config:
|
|
92
109
|
aws_secret_access_key=os.getenv("AWS_SECRET_ACCESS_KEY"),
|
93
110
|
aws_region=os.getenv("AWS_REGION", "us-east-1"),
|
94
111
|
aws_model=os.getenv("AWS_MODEL", "us.anthropic.claude-3-5-sonnet-20241022-v2:0"),
|
95
|
-
watsonx_api_key=
|
96
|
-
watsonx_project_id=
|
97
|
-
watsonx_model=
|
112
|
+
watsonx_api_key=watsonx_api_key,
|
113
|
+
watsonx_project_id=watsonx_project_id,
|
114
|
+
watsonx_model=watsonx_model,
|
98
115
|
google_project_id=os.getenv("GOOGLE_PROJECT_ID"),
|
99
116
|
google_location=os.getenv("GOOGLE_LOCATION", "us-central1"),
|
100
117
|
google_model=os.getenv("GOOGLE_MODEL", "gemini-1.5-pro"),
|
@@ -25,7 +25,7 @@ from sqlalchemy.dialects.postgresql import JSONB
|
|
25
25
|
import os
|
26
26
|
|
27
27
|
# Database configuration
|
28
|
-
DB_URI = os.getenv('DATABASE_URL', "cockroachdb://root@localhost:26257/
|
28
|
+
DB_URI = os.getenv('DATABASE_URL', "cockroachdb://root@localhost:26257/defaultdb?sslmode=disable")
|
29
29
|
|
30
30
|
# Apply CockroachDB version parsing workaround
|
31
31
|
from sqlalchemy.dialects.postgresql.base import PGDialect
|
{banko_ai_assistant-1.0.11 → banko_ai_assistant-1.0.13}/banko_ai/vector_search/enrichment.py
RENAMED
@@ -43,7 +43,7 @@ class DataEnricher:
|
|
43
43
|
**kwargs
|
44
44
|
) -> str:
|
45
45
|
"""
|
46
|
-
|
46
|
+
Create a simple description that matches the original CSV format.
|
47
47
|
|
48
48
|
Args:
|
49
49
|
description: Original expense description
|
@@ -55,49 +55,10 @@ class DataEnricher:
|
|
55
55
|
**kwargs: Additional metadata
|
56
56
|
|
57
57
|
Returns:
|
58
|
-
|
58
|
+
Simple description string matching original CSV format
|
59
59
|
"""
|
60
|
-
#
|
61
|
-
|
62
|
-
|
63
|
-
# Add merchant name and amount prominently
|
64
|
-
enriched_parts.append(f"at {merchant} for ${amount:.2f}")
|
65
|
-
|
66
|
-
# Add merchant context
|
67
|
-
merchant_context = self._get_merchant_context(merchant, amount)
|
68
|
-
if merchant_context:
|
69
|
-
enriched_parts.append(merchant_context)
|
70
|
-
|
71
|
-
# Add amount context
|
72
|
-
amount_context = self._get_amount_context(amount)
|
73
|
-
if amount_context:
|
74
|
-
enriched_parts.append(amount_context)
|
75
|
-
|
76
|
-
# Add category context
|
77
|
-
category_context = self._get_category_context(category, merchant)
|
78
|
-
if category_context:
|
79
|
-
enriched_parts.append(category_context)
|
80
|
-
|
81
|
-
# Add payment method context
|
82
|
-
payment_context = self._get_payment_context(payment_method)
|
83
|
-
if payment_context:
|
84
|
-
enriched_parts.append(payment_context)
|
85
|
-
|
86
|
-
# Add temporal context
|
87
|
-
temporal_context = self._get_temporal_context(date)
|
88
|
-
if temporal_context:
|
89
|
-
enriched_parts.append(temporal_context)
|
90
|
-
|
91
|
-
# Add merchant category context
|
92
|
-
merchant_category = self._get_merchant_category(merchant)
|
93
|
-
if merchant_category:
|
94
|
-
enriched_parts.append(f"at {merchant_category} store")
|
95
|
-
|
96
|
-
# Combine all parts
|
97
|
-
enriched_description = " ".join(enriched_parts)
|
98
|
-
|
99
|
-
# Clean up and format
|
100
|
-
enriched_description = self._clean_description(enriched_description)
|
60
|
+
# Create the exact same format as the original CSV
|
61
|
+
enriched_description = f"Spent ${amount:.2f} on {category.lower()} at {merchant} using {payment_method}."
|
101
62
|
|
102
63
|
return enriched_description
|
103
64
|
|
@@ -243,36 +204,15 @@ class DataEnricher:
|
|
243
204
|
**kwargs
|
244
205
|
) -> str:
|
245
206
|
"""
|
246
|
-
Create a
|
207
|
+
Create a simple searchable text that matches the original CSV format.
|
247
208
|
|
248
|
-
This creates
|
249
|
-
|
209
|
+
This creates the exact same format as the original CSV:
|
210
|
+
"Spent $X.XX on [category] at [merchant] using [payment_method]."
|
250
211
|
"""
|
251
212
|
# Extract required parameters from kwargs
|
252
|
-
payment_method = kwargs.get('payment_method', '')
|
253
|
-
date = kwargs.get('date', datetime.now())
|
254
|
-
|
255
|
-
# Remove these from kwargs to avoid conflicts
|
256
|
-
filtered_kwargs = {k: v for k, v in kwargs.items() if k not in ['payment_method', 'date']}
|
257
|
-
|
258
|
-
enriched_description = self.enrich_expense_description(
|
259
|
-
description, merchant, amount, category, payment_method, date, **filtered_kwargs
|
260
|
-
)
|
261
|
-
|
262
|
-
# Create a comprehensive searchable text
|
263
|
-
searchable_parts = [
|
264
|
-
f"Spent ${amount:.2f} on {enriched_description}",
|
265
|
-
f"Merchant: {merchant}",
|
266
|
-
f"Category: {category}",
|
267
|
-
f"Amount: ${amount:.2f}"
|
268
|
-
]
|
269
|
-
|
270
|
-
# Add any additional context
|
271
|
-
if kwargs.get('payment_method'):
|
272
|
-
searchable_parts.append(f"Payment: {kwargs['payment_method']}")
|
213
|
+
payment_method = kwargs.get('payment_method', 'Credit Card')
|
273
214
|
|
274
|
-
|
275
|
-
|
276
|
-
searchable_parts.append(f"Tags: {tags}")
|
215
|
+
# Create the exact same format as the original CSV
|
216
|
+
searchable_text = f"Spent ${amount:.2f} on {category.lower()} at {merchant} using {payment_method}."
|
277
217
|
|
278
|
-
return
|
218
|
+
return searchable_text
|