AIN. - AnythingLLM AI

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

AIN. - AnythingLLM AI

AIN.DeleteThread

Previous Top Next


MiniRobotLanguage (MRL)

 

AIN.DeleteThread
Delete a Thread from a Workspace

 

Intention

 

DeleteThread Command: Removing a Thread
 
The DeleteThread Command removes a specified thread from a workspace in the AnythingLLM API, helping manage and clean up thread-based conversations or tasks.

This is useful for maintaining an organized workspace by eliminating obsolete or completed threads.

It�s part of the AIN - AnythingLLM AI suite.

 

What is the DeleteThread Command?

 

The DeleteThread Command sends a request to the AnythingLLM API to delete a thread identified by its slug within a specified workspace.

It requires the workspace slug and thread slug, optionally returning a response in a variable or on the stack.

 

Why Do You Need It?

 

Deleting threads is beneficial for:

Cleanup: Remove outdated or unnecessary threads.

Resource Management: Free up workspace resources.

Clarity: Keep the workspace focused on active threads.

 

How to Use the DeleteThread Command?

 

Call this Command with the workspace slug and thread slug, optionally specifying a variable to store the response.

The response confirms deletion or provides an error if the thread doesn�t exist.

 

Example Usage

 

AIN.DeleteThread|my-workspace|thread-001|$$RES

DBP.Deletion Response: $$RES

 

This deletes the thread with slug "thread-001" from "my-workspace".

 

Illustration

 

+-------------------+

� Thread Deletion � �

+-------------------�

� thread-001 gone � �

+-------------------+

The thread is removed from the workspace.

 

Syntax

 

AIN.DeleteThread|P1|P2[|P3]

 

Parameter Explanation

 

P1 - Workspace slug (required) - Identifies the workspace containing the thread.

P2 - Thread slug (required) - Specifies the thread to delete.

P3 - (Optional) Variable to store the response; otherwise, it�s on the stack.

 

Example

 

AIN.DeleteThread|my-workspace|thread-001|$$RES

DBP.Response: $$RES

ENR.

 

Remarks

 

- Requires a valid API key set via AIN.SetKey.

- Deletion is permanent and cannot be undone.

 

Limitations

 

- Fails if the thread or workspace does not exist.

- Limited to 3 or 4 parameters as per the code constraints.

 

See also:

 

? AIN.CreateThread

? AIN.GetThreadChats

? AIN.ExecuteThreadChat

? AIN.DeleteWorkspace