llm_operate_file
Last updated
# Create a text file
response = llm_operate_file(
"file_assistant",
messages=[
{"role": "user", "content": "Create a new file called notes.txt with a todo list for today"}
]
)
# Process the response
print(response["response"]["response_message"]) # Contains information about the file operationmessages = [
{
"role": "system", # Can be "system", "user", or "assistant"
"content": "You are a helpful assistant specialized in...", # Message content
"name": "example_name" # Optional name for the message sender
},
{
"role": "user",
"content": "Please help me with..."
}
]