doc: added best practices with examples

This commit is contained in:
Alpha Nerd 2026-03-04 16:02:29 +01:00
parent 14f841a0bf
commit d4869193d8
2 changed files with 35 additions and 1 deletions

View file

@ -29,7 +29,13 @@ async def main():
temperature=0.7
)
print(response['choices'][0]['message']['content'])
# Extract what you need, then delete the response dict immediately.
# This minimises the time decrypted data lives in process memory
# (reduces exposure from swap files, core dumps, or memory inspection).
reply = response['choices'][0]['message']['content']
del response
print(reply)
asyncio.run(main())
```