Skip to main content

HTTP client helpers for the engine matching Flask API.

Project description

Translation endpoint

Run python gemini_shipping_flask_api.py and send a POST /translate request with JSON such as:

curl -X POST http://localhost:5050/translate \
  -H "Content-Type: application/json" \
  -d '{"text": "boleh tolong check status order saya?"}'

The API responds with the sanitized original text and an English translation derived from the configured OpenAI model. Basic HTML tags are stripped before translation to handle chat inputs that include markup, and empty prompts are rejected after cleaning. The /search endpoint also removes HTML markup, detects Malay inputs, translates them to English, and only skips translation when the request already appears to be English.

Streamlit chatbot

Run the Flask API first so the UI can delegate search and summarisation to /search:

python gemini_shipping_flask_api.py

Then launch the Streamlit UI in a separate terminal:

streamlit run streamlit_chat.py

By default, the app posts to http://localhost:5050/search. Override the endpoint with CHATBOT_SEARCH_URL if you deploy the API elsewhere. The sidebar shows the running conversation summary returned by the backend, and the conversation history stays in the session so follow-up questions include prior context.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

engine_matching_client-0.1.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

engine_matching_client-0.1.1-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file engine_matching_client-0.1.1.tar.gz.

File metadata

  • Download URL: engine_matching_client-0.1.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for engine_matching_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6f2f69005d54fea1e854208003ee0607c16ca050c514ab142140eb3b3d1e1cc9
MD5 7fe4c41b0e204b819656e19ca69a5e38
BLAKE2b-256 96384ffdea237ddc04054bbf3eef42a5e9fa283e1fad81c8777f18af8b873e39

See more details on using hashes here.

File details

Details for the file engine_matching_client-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for engine_matching_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5b8fc63fa33512699fd07c364cf7f6e19d2d45f39261abd4107b0423ca1c539f
MD5 efbc7b5c09c4aa3c61ede6a0ad6175fd
BLAKE2b-256 7f97fbb3330325ec81aecfe8d85866892d8632f36d206d1f6583427cbe59e78b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page