diff --git a/tools/standalone_llm_tool.md b/tools/standalone_llm_tool.md index 5c2f4e6..6c4d2b7 100644 --- a/tools/standalone_llm_tool.md +++ b/tools/standalone_llm_tool.md @@ -1,31 +1,35 @@ # Standalone LLM Tool ## Overview -The Standalone LLM Tool is designed to interact with a preview version of a Large Language Model (LLM) independently. This tool utilizes advanced reasoning and coding capabilities to generate responses based on user input prompts. +The Standalone LLM Tool is designed to interact with a preview version of a Large Language Model (LLM) programmatically. This tool utilizes advanced reasoning and coding capabilities to generate responses based on user input prompts. ## Setup 1. **Environment Variables**: Ensure that the `OPENAI_API_KEY` is set in your environment to authenticate API requests. 2. **Dependencies**: Make sure all dependencies are installed as per `requirements.txt`. ## Usage -- Run the tool via the command line: - ```bash - python standalone_llm_tool.py +Instead of using command-line prompts, this tool can now be integrated directly into your Python projects: + +### Function Usage +- Import the tool and use the following utility function: + ```python + from standalone_llm_tool import get_llm_response + + # Parameters: prompt (str), model (str, optional), max_tokens (int, optional) + response = get_llm_response("What is AI?", model="llm-preview", max_tokens=16384) + + print(response) ``` -- Enter a prompt when prompted: - ``` - Enter your prompt: - ``` -- View the detailed response provided by the LLM preview model. ## Features -- **LLM Model**: Utilizes a designated LLM preview model for processing. -- **Prompt Handling**: Accepts user input and returns comprehensive instructions or code snippets. -- **Advanced Reasoning**: Leverages the model's capabilities for enhanced reasoning and coding tasks. +- **LLM Model**: Accepts a designated model parameter for flexible processing. +- **Prompt Handling**: Accepts user input and provides comprehensive instructions or code snippets. +- **Dynamic Parameters**: Allows customization of the model and max tokens per request. +- **Advanced Reasoning**: Leverages the LLM's capabilities for enhanced reasoning and coding tasks. ## Notes -- This tool is designed for standalone execution and does not integrate with Telegram or other platforms. -- The model used here is intended for generating detailed narratives or solving coding-related queries, thanks to its preview features. +- The model and token parameters are dynamically handled, offering flexibility for various application needs. +- This tool is ideal for generating detailed narratives or solving coding-related queries due to its advanced LLM capabilities. ## Troubleshooting For any issues encountered while using the tool, consider the following: