Update standalone LLM tool documentation for dynamic parameter usage and programmatic access.
This commit is contained in:
@@ -1,31 +1,35 @@
|
|||||||
# Standalone LLM Tool
|
# Standalone LLM Tool
|
||||||
|
|
||||||
## Overview
|
## 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
|
## Setup
|
||||||
1. **Environment Variables**: Ensure that the `OPENAI_API_KEY` is set in your environment to authenticate API requests.
|
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`.
|
2. **Dependencies**: Make sure all dependencies are installed as per `requirements.txt`.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
- Run the tool via the command line:
|
Instead of using command-line prompts, this tool can now be integrated directly into your Python projects:
|
||||||
```bash
|
|
||||||
python standalone_llm_tool.py
|
### 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: <Your detailed prompt here>
|
|
||||||
```
|
|
||||||
- View the detailed response provided by the LLM preview model.
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
- **LLM Model**: Utilizes a designated LLM preview model for processing.
|
- **LLM Model**: Accepts a designated model parameter for flexible processing.
|
||||||
- **Prompt Handling**: Accepts user input and returns comprehensive instructions or code snippets.
|
- **Prompt Handling**: Accepts user input and provides comprehensive instructions or code snippets.
|
||||||
- **Advanced Reasoning**: Leverages the model's capabilities for enhanced reasoning and coding tasks.
|
- **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
|
## Notes
|
||||||
- This tool is designed for standalone execution and does not integrate with Telegram or other platforms.
|
- The model and token parameters are dynamically handled, offering flexibility for various application needs.
|
||||||
- The model used here is intended for generating detailed narratives or solving coding-related queries, thanks to its preview features.
|
- This tool is ideal for generating detailed narratives or solving coding-related queries due to its advanced LLM capabilities.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
For any issues encountered while using the tool, consider the following:
|
For any issues encountered while using the tool, consider the following:
|
||||||
|
|||||||
Reference in New Issue
Block a user