mirror of
https://github.com/ianarawjo/ChainForge.git
synced 2025-03-14 16:26:45 +00:00
* Beginning to convert Python backend to Typescript * Change all fetch() calls to fetch_from_backend switcher * wip converting query.py to query.ts * wip started utils.js conversion. Tested that OpenAI API call works * more progress on converting utils.py to Typescript * jest tests for query, utils, template.ts. Confirmed PromptPipeline works. * wip converting queryLLM in flask_app to TS * Tested queryLLM and StorageCache compressed saving/loading * wip execute() in backend.ts * Added execute() and tested w concrete func. Need to test eval() * Added craco for optional webpack config. Config'd for TypeScript with Node.js packages browserify'd * Execute JS code on iframe sandbox * Tested and working JS Evaluator execution. * wip swapping backends * Tested TypeScript backendgit status! :) woot * Added fetchEnvironAPIKeys to Flask server to fetch os.environ keys when running locally * Route Anthropic calls through Flask when running locally * Added info button to Eval nodes. Rebuilt react * Edits to info modal on Eval node * Remove/error out on Python eval nodes when not running locally. * Check browser compat and display error if not supported * Changed all example flows to use JS. Bug fix in query.ts * Refactored to LLMProvider to streamline model additions * Added HuggingFace models API * Added back Dalai call support, routing through Flask * Remove flask app calls and socketio server that are no longer used * Added Comment Nodes. Rebuilt react. * Fix PaLM temp=0 build, update package vers and rebuild react
1 line
8.4 KiB
Plaintext
1 line
8.4 KiB
Plaintext
{"flow": {"nodes": [{"width": 312, "height": 311, "id": "prompt-banking77", "type": "prompt", "data": {"prompt": "{prompt}", "n": 1, "llms": [{"key": "aa3c0f03-22bd-416e-af4d-4bf5c4278c99", "settings": {"system_msg": "You are a classification bot. You will be given a sentence and you have to classify it into one of the 77 categories. \nAnswer simply with the name of the category\nHere are the categories:\n - activate_my_card\n - age_limit\n - apple_pay_or_google_pay\n - atm_support\n - automatic_top_up\n - balance_not_updated_after_bank_transfer\n - balance_not_updated_after_cheque_or_cash_deposit\n - beneficiary_not_allowed\n - cancel_transfer\n - card_about_to_expire\n - card_acceptance\n - card_arrival\n - card_delivery_estimate\n - card_linking\n - card_not_working\n - card_payment_fee_charged\n - card_payment_not_recognised\n - card_payment_wrong_exchange_rate\n - card_swallowed\n - cash_withdrawal_charge\n - cash_withdrawal_not_recognised\n - change_pin\n - compromised_card\n - contactless_not_working\n - country_support\n - declined_card_payment\n - declined_cash_withdrawal\n - declined_transfer\n - direct_debit_payment_not_recognised\n - disposable_card_limits\n - edit_personal_details\n - exchange_charge\n - exchange_rate\n - exchange_via_app\n - extra_charge_on_statement\n - failed_transfer\n - fiat_currency_support\n - get_disposable_virtual_card\n - get_physical_card\n - getting_spare_card\n - getting_virtual_card\n - lost_or_stolen_card\n - lost_or_stolen_phone\n - order_physical_card\n - passcode_forgotten\n - pending_card_payment\n - pending_cash_withdrawal\n - pending_top_up\n - pending_transfer\n - pin_blocked\n - receiving_money\n - Refund_not_showing_up\n - request_refund\n - reverted_card_payment?\n - supported_cards_and_currencies\n - terminate_account\n - top_up_by_bank_transfer_charge\n - top_up_by_card_charge\n - top_up_by_cash_or_cheque\n - top_up_failed\n - top_up_limits\n - top_up_reverted\n - topping_up_by_card\n - transaction_charged_twice\n - transfer_fee_charged\n - transfer_into_account\n - transfer_not_received_by_recipient\n - transfer_timing\n - unable_to_verify_identity\n - verify_my_identity\n - verify_source_of_funds\n - verify_top_up\n - virtual_card_not_working\n - visa_or_mastercard\n - why_verify_identity\n - wrong_amount_of_cash_received\n - wrong_exchange_rate_for_cash_withdrawal \n", "temperature": 1, "functions": [], "function_call": "", "top_p": 1, "stop": [], "presence_penalty": 0, "frequency_penalty": 0}, "name": "GPT3.5", "emoji": "\ud83d\ude42", "model": "gpt-3.5-turbo", "base_model": "gpt-3.5-turbo", "temp": 1, "formData": {"shortname": "GPT3.5", "model": "gpt-3.5-turbo", "system_msg": "You are a classification bot. You will be given a sentence and you have to classify it into one of the 77 categories. \nAnswer simply with the name of the category\nHere are the categories:\n - activate_my_card\n - age_limit\n - apple_pay_or_google_pay\n - atm_support\n - automatic_top_up\n - balance_not_updated_after_bank_transfer\n - balance_not_updated_after_cheque_or_cash_deposit\n - beneficiary_not_allowed\n - cancel_transfer\n - card_about_to_expire\n - card_acceptance\n - card_arrival\n - card_delivery_estimate\n - card_linking\n - card_not_working\n - card_payment_fee_charged\n - card_payment_not_recognised\n - card_payment_wrong_exchange_rate\n - card_swallowed\n - cash_withdrawal_charge\n - cash_withdrawal_not_recognised\n - change_pin\n - compromised_card\n - contactless_not_working\n - country_support\n - declined_card_payment\n - declined_cash_withdrawal\n - declined_transfer\n - direct_debit_payment_not_recognised\n - disposable_card_limits\n - edit_personal_details\n - exchange_charge\n - exchange_rate\n - exchange_via_app\n - extra_charge_on_statement\n - failed_transfer\n - fiat_currency_support\n - get_disposable_virtual_card\n - get_physical_card\n - getting_spare_card\n - getting_virtual_card\n - lost_or_stolen_card\n - lost_or_stolen_phone\n - order_physical_card\n - passcode_forgotten\n - pending_card_payment\n - pending_cash_withdrawal\n - pending_top_up\n - pending_transfer\n - pin_blocked\n - receiving_money\n - Refund_not_showing_up\n - request_refund\n - reverted_card_payment?\n - supported_cards_and_currencies\n - terminate_account\n - top_up_by_bank_transfer_charge\n - top_up_by_card_charge\n - top_up_by_cash_or_cheque\n - top_up_failed\n - top_up_limits\n - top_up_reverted\n - topping_up_by_card\n - transaction_charged_twice\n - transfer_fee_charged\n - transfer_into_account\n - transfer_not_received_by_recipient\n - transfer_timing\n - unable_to_verify_identity\n - verify_my_identity\n - verify_source_of_funds\n - verify_top_up\n - virtual_card_not_working\n - visa_or_mastercard\n - why_verify_identity\n - wrong_amount_of_cash_received\n - wrong_exchange_rate_for_cash_withdrawal \n", "temperature": 1, "functions": "", "function_call": "", "top_p": 1, "stop": "", "presence_penalty": 0, "frequency_penalty": 0}}]}, "position": {"x": 448, "y": 224}, "selected": false, "positionAbsolute": {"x": 448, "y": 224}, "dragging": false}, {"width": 333, "height": 182, "id": "eval-banking77", "type": "evaluator", "data": {"code": "function evaluate(response) {\n\tlet ideal = response.meta['Ideal'];\n\treturn response.text.startsWith(ideal);\n}", "language": "javascript"}, "position": {"x": 820, "y": 150}, "positionAbsolute": {"x": 820, "y": 150}}, {"width": 228, "height": 196, "id": "vis-banking77", "type": "vis", "data": {"input": "eval-banking77"}, "position": {"x": 1200, "y": 250}, "positionAbsolute": {"x": 1200, "y": 250}}, {"width": 302, "height": 260, "id": "inspect-banking77", "type": "inspect", "data": {"input": "prompt-banking77"}, "position": {"x": 820, "y": 400}, "positionAbsolute": {"x": 820, "y": 400}}, {"width": 423, "height": 417, "id": "table-banking77", "type": "table", "data": {"rows": [{"prompt": "Are there restrictions for my disposable card since it does not seem to be working?", "ideal": "virtual_card_not_working"}, {"prompt": "I'm trying to transfer money to another country. It's just pending and not sending. My account details are correct. Please help me.", "ideal": "pending_transfer"}, {"prompt": "What do I do if I notice a strange withdrawl in my statement?", "ideal": "cash_withdrawal_not_recognised"}, {"prompt": "I got a message that I need to verify my identity; what do I do?", "ideal": "verify_my_identity"}, {"prompt": "How do I use the app if I don't have my phone with me?", "ideal": "lost_or_stolen_phone"}, {"prompt": "why is the exchange rate for a Foreign ATM different", "ideal": "wrong_exchange_rate_for_cash_withdrawal"}, {"prompt": "What happens if my card is stuck in the ATM?", "ideal": "card_swallowed"}, {"prompt": "Is there a discount for frequently exchanging currencies?", "ideal": "exchange_charge"}, {"prompt": "I sent money. They haven't received it.", "ideal": "transfer_not_received_by_recipient"}, {"prompt": "What age do my kids need to be to use your service?", "ideal": "age_limit"}], "columns": [{"key": "prompt", "header": "Prompt"}, {"key": "ideal", "header": "Ideal"}]}, "position": {"x": -16, "y": 160}, "selected": false, "positionAbsolute": {"x": -16, "y": 160}, "dragging": false}], "edges": [{"source": "prompt-banking77", "sourceHandle": "prompt", "target": "eval-banking77", "targetHandle": "responseBatch", "interactionWidth": 100, "markerEnd": {"type": "arrow", "width": "22px", "height": "22px"}, "id": "reactflow__edge-prompt-1686756357355prompt-eval-1686756357355responseBatch"}, {"source": "prompt-banking77", "sourceHandle": "prompt", "target": "inspect-banking77", "targetHandle": "input", "interactionWidth": 100, "markerEnd": {"type": "arrow", "width": "22px", "height": "22px"}, "id": "reactflow__edge-prompt-1686756357355prompt-inspect-1686756357355input"}, {"source": "eval-banking77", "sourceHandle": "output", "target": "vis-banking77", "targetHandle": "input", "interactionWidth": 100, "markerEnd": {"type": "arrow", "width": "22px", "height": "22px"}, "id": "reactflow__edge-eval-1686756357355output-vis-1686756357355input"}, {"source": "table-banking77", "sourceHandle": "Prompt", "target": "prompt-banking77", "targetHandle": "prompt", "interactionWidth": 100, "markerEnd": {"type": "arrow", "width": "22px", "height": "22px"}, "id": "reactflow__edge-table-1686756385002Prompt-prompt-1686756357355prompt"}], "viewport": {"x": 144, "y": 37, "zoom": 1}}, "cache": {"eval-1686756357355.json": {}, "inspect-1686756357355.json": {}, "prompt-1686756357355.json": {}, "table-1686756385002.json": {}, "vis-1686756357355.json": {}}} |