SuffolkLITLab / docassemble-ALToolbox

Collection of small utility functions, classes, and web components for Docassemble interviews
https://suffolklitlab.org/docassemble-AssemblyLine-documentation/docs/framework/altoolbox
MIT License
14 stars 2 forks source link

Make moderation optional in llms.py, remove references to gpt-4-turbo-1106-preview as json mode is now general release #255

Closed nonprofittechy closed 5 months ago

nonprofittechy commented 5 months ago

Fix #254

For speed and efficiency, automators may want to skip the moderation endpoint that is usually called by the chat_completion function. All queries are moderated by default as a best practice to avoid the account being flagged, but if you know the query is safe, this change allows you to skip it.

Also removed some logging statements that could have slowed down performance.