AssistantStepInfo Class

Assembly: CodeEffects.Rule.Repository.dll
Namespace: CodeEffects.Rule.Repository

Summary

Describes the step of an AI Assistant or AI Rule Editor turn that is about to run. It is given to the CanStep callback of AssistantSettings, which can stop the turn.

Syntax

public class AssistantStepInfo

Remarks

You never create this class. The repository creates one before each model call and passes it to CanStep. Return null from the callback to let the step run, or return a message to stop the turn and show that message to the user.

Properties

  • ConversationId

    Type: System.Int64

    Gets or sets the ID of the conversation.

  • ModelKey

    Type: System.String

    Gets or sets the Key of the AssistantModel that the step calls.

  • RuleEditor

    Type: System.Boolean

    Gets or sets whether the step is for the AI Rule Editor (true) rather than for the AI Assistant (false).

  • Step

    Type: System.Int32

    Gets or sets the number of the step in its turn, counting model calls from 1. The count starts again when the user sends a new message or chooses to continue after the step limit.

  • UserId

    Type: System.String

    Gets or sets the ID of the user that the step is for.

    Example

      using CodeEffects.Rule.Repository;
    
      var settings = new AssistantSettings
      {
      	CanStep = step => step.Step > 10 && step.UserId == "guest" ? "Guests are limited to ten steps a turn." : null
      };
    

Ask on Stack Overflow - Yes, it's still active
Ask in GitHub Discussions

p102

l097 --

l102

p101

×