Smartloop Command Line interface to process documents using LLM
Project description
Use the CLI to upload, manage, and query documents based on fine-tuned LLM models. It uses the smartloop API to manage projects and documents and gives you an easy way to quickly process contents and reason based on it.
Requirements
- Python 3.11
Installation
Install the CLI with the following command:
pip install -U smartloop
Once installed, check that everything is setup correctly:
smartloop --help
Usage: smartloop [OPTIONS] COMMAND [ARGS]...
╭─ Options ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or customize the installation. │
│ --help Show this message and exit. │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ whoami Find out which account you are logged in │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Setup
To authenticate with the Smartloop Platform, run the following command in your terminal:
smartloop login
You will be prompted to visit https://app.smartloop.ai/developer to copy your access token. Paste your token into the CLI when prompted. The token will be saved for future use.
Create a Project
Once you have configured the CLI , you can start creating projects using the following command:
smartloop projects create --name microsoft
Select a Project
Use the following command to interactively select a project:
smartloop projects select
Upload Document
Once the project is selected , upload documents from your folder or a specific file to personalized your project, in this case I am uploading the a document describing Microsoft online services form my local machine:
smartloop upload --path=~/document1.pdf
Run It
Execute the following command to start prompting:
smartloop run
This will start a chat session with your currently selected project. If no project is currently selected, you'll be prompted to choose one interactively.
Run with a Specific Project
You can also run a chat session directly with a specific project by providing its ID:
smartloop run --project-id your-project-id
This bypasses the need to first select a project and directly starts the chat session with the specified project.
To find your project ID, you can list all your projects:
smartloop projects list
This will bring up the interface to prompt your queries as shown below:
Microsoft(microsoft-24-07-2024)
======================================
Enter prompt (Ctrl-C to exit):
what the SLA for azure open ai
⠋
The SLA (Service Level Agreement) for Azure OpenAI is not explicitly mentioned in the provided text. However, it's possible that the SLA for Azure OpenAI might be similar to the one mentioned below:
"Uptime Percentage"
* Service Credit:
+ < 99.9%: 10%
+ < 99%: 25%
+ < 95%: 100%
Please note that this is not a direct quote from the provided text, but rather an inference based on the format and structure of the SLA mentioned for other Azure services (e.g., SAP HANA on Azure High Availability Pair). To confirm the actual SLA for Azure OpenAI, you should check the official Microsoft documentation or contact their support team.
Prompt message (Ctrl-C to exit):
In order to set temperature of your conversation, which ranges from 0.0 to 1.0, use the following command:
</code></pre>
<p>To enable memory to retain context in the conversation, use the following command:</p>
<pre lang="bash"><code>
To disable memory, use the following command:
smartloop projects set --id=project_id --no-memory
LLM temperature is a parameter that influences the language model's output, determining whether the output is more random and creative or more predictable.
The higher value tends towards more creative answer
Supported Documents types
- DOCX
- TXT
- CSV
Contributing
Contributions are welcome! Please create a pull request with your changes.
Contact
If you have any questions or suggestions, please feel free to reach out to hello@smartloop.ai
References
License
This project is licensed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file smartloop-1.3.2.tar.gz.
File metadata
- Download URL: smartloop-1.3.2.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c68a514517f6ed2d405dd1dc4142b725bc1c4dc1aa3f4c24ef2ccf2f18c5ac6
|
|
| MD5 |
4903dc7a6b7e25d22eba74a7399a5bb0
|
|
| BLAKE2b-256 |
182d1a4f11139fa1d2cc9a76197c0ebd43bad854d5435b8837f5e24a76a36057
|
File details
Details for the file smartloop-1.3.2-py3-none-any.whl.
File metadata
- Download URL: smartloop-1.3.2-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba78ae944207e0acd6f45e52bb42aee2326eb3d708a5bf4f8ef7621027b27fe0
|
|
| MD5 |
9840e17c88d9f504a543751cb452e908
|
|
| BLAKE2b-256 |
3adf8032d94e281d21da07202d2f7891fc49cdd8441680b0c8979ea1aa0ab7b9
|