Basic Chat
Send a single chat message and receive a response.
Send your first LLM chat message in minutes, then swap providers without touching your application code.
Edition
Section titled “Edition”Community — runs on the OSS / Community SDK edition.
What this demonstrates
Section titled “What this demonstrates”Difficulty: Starter 🟢 · LLM
- Summary: Basic chat completion with a simple prompt
- Scenario: Send a single chat message and receive a response
tech_tagsin manifest:LLM— example idbasic-chatinconformance/examples_manifest.json.
Prerequisites
Section titled “Prerequisites”- SDK: Use an installed SDK tree (
NXUSKIT_SDK_DIR,NXUSKIT_LIB_PATHas needed);test-examples.shresolves Go/Rust/Python deps from that tree only — see README.md,scripts/setup-sdk.sh, andscripts/test-examples.sh. - Languages in this example: go, python, rust (paths under this directory; Python may live under a sibling
python/or shared reference per Language Implementations). - Models: Set cloud provider API keys and/or run Ollama locally when you execute the Run steps (interactive flags like
--help/--verboseare documented below).
Real-World Application
Section titled “Real-World Application”Customer support chatbot, FAQ assistant
Technologies
Section titled “Technologies”LLM
Language Implementations
Section titled “Language Implementations”| Language | Path | Status |
|---|---|---|
| Rust | rust/ | Available |
| Go | go/ | Available |
| Python | python/ | Available |
Use an installed SDK (NXUSKIT_SDK_DIR); from the repo root, scripts/test-examples.sh patches nxuskit path deps to that tree and builds this crate.
cd rust && cargo buildcd ../go && make buildcd ../python && python3 main.py --helpcd rustcargo runcd gomake build && bin/basic-chatPython
Section titled “Python”cd pythonpython main.pySee also: EXAMPLE_README_TEMPLATE.md for the standard README sections.