Allows LLMs to assist you with various tasks, all while being open-source!
Project description
DIY-Assistant
Make your own assistant through the use of LLMs
Current State
DIY Assistant is still in development, but I hope to make the app usable in a similar manner as the below code:
from helpful_assistant import Assistant
class Model:
def generate(prompt: str, stream: bool):
pass # return a generator or a string
def form_prompt(messages):
pass # not sure if we want to use. Might get in the way if using an api.
# init the app given a model class
app = Assistant(llm_class=Model, default_stream_response=True)
while True:
# Gather user input. Could be linked to transcription software, for example
user_input = input("> ")
# Allow the LLM to access the modules and actions and get their outputs
generator = app.generate(user_input, stream=True, allow_action_execution=True)
# Generate the final output of the model after the data lookups
for resp in generator:
print(resp.text, flush=True, end="")
print()
# show the data that the model accessed
print(generator.accessed_actions)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
helpful_assistant-0.0.9.tar.gz
(18.1 kB
view hashes)
Built Distribution
Close
Hashes for helpful_assistant-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddebd5582c1083ec331dc19bd470e03dde61bdd14e745cf57e4d4418f553c02f |
|
MD5 | 8f3c1235517afe36ea8d4d0f052ad1bb |
|
BLAKE2b-256 | a80b8aefaa1cb2b11a2ca78f2351d5ec3cbee5d422ffc5a8e14a74d0320b311b |