Refactor Standalone LLM Tool for programmatic use.

This commit is contained in:
cyclop-bot
2024-10-28 10:18:02 -05:00
parent c4cbe90bd6
commit 055399c514
+5 -7
View File
@@ -23,11 +23,9 @@ class StandaloneLLMTool:
logging.info("Response generated")
return response.choices[0].text
def main():
tool = StandaloneLLMTool()
user_prompt = input("Enter your prompt: ")
response = tool.process_user_input(user_prompt)
print("Response:", response)
if __name__ == '__main__':
main()
# Utility function for programmatic access
def get_llm_response(prompt):
tool = StandaloneLLMTool()
return tool.process_user_input(prompt)