use¶
simple_chat(router, prompt, task_tag='generic', *, model=None)
¶
Perform a simple chat interaction with the LLM via the router.
Example
from wintermute.ai.bootstrap import init_router from wintermute.ai.use import simple_chat router = init_router()
Default (Claude)¶
print(simple_chat(router, "Summarize: UART vs JTAG risks")) Here's a summary comparing the risks of UART vs JTAG:
UART (Universal Asynchronous Receiver/Transmitter):
- Lower security risk overall
- Limited access to system internals
- Typically only provides console access
- Can potentially expose sensitive information in debug output
- Easier to secure by disabling or removing headers
JTAG (Joint Test Action Group):
- Higher security risk
- Provides deep access to system internals
- Allows for full control of the processor and memory
- Can be used to extract firmware, modify code, and bypass security measures
- More challenging to fully secure, often requires physical fuses or permanent disabling
DeepSeek (inference profile)¶
print( ... simple_chat( ... router, ... "Summarize UART vs JTAG risks in 3 bullets", ... model="us.deepseek.r1-v1:0", ... ) ... )
- Access Level: UART exposes a serial console for command-line interaction, risking unauthorized system access, while JTAG provides deeper hardware control, enabling memory/firmware manipulation and security bypass.
- Exploitation Barrier: UART requires basic tools (e.g., USB-to-TTL) and minimal expertise, making it easier to exploit, whereas JTAG demands specialized tools and advanced knowledge, raising the entry barrier for attackers.
- Impact Severity: UART compromises may lead to configuration changes or log leaks, but JTAG breaches can
result in full system control, firmware extraction, or intellectual property theft, posing a critical threat.
Llama¶
print( ... simple_chat( ... router, ... "Summarize UART vs JTAG risks in a One-liner", ... model="meta.llama3-8b-instruct-v1:0", ... ) ... ) UART (Universal Asynchronous Receiver-Transmitter) and JTAG (Joint Test Action Group) are both debugging interfaces, but UART is a more vulnerable and risky option due to its ability to be easily accessed and manipulated by an attacker, whereas JTAG is a more secure option due to its complexity and limited accessibility, making it a better choice for debugging and testing purposes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
router
|
Router
|
The Router instance to use for selecting the provider. |
required |
prompt
|
str
|
The user prompt to send to the LLM. |
required |
task_tag
|
str
|
A tag to categorize the task (default is "generic"). |
'generic'
|
model
|
Optional[str]
|
An optional model name to use for the request. |
None
|
Source code in wintermute/ai/use.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | |