Skip to content

question

Command question#

Get an answer to a question.

Usage:

halguru question [options]
Options Default Description
-h, --help Prints help information
-a, --agent-file The YAML file that defines the agent to be used.
-s, --session-file state.halguru-state.yaml The session file to run AI Robot with.
-w, --write-session-on-exit False If specified, the session file will be written on exit.
-q, --question-message Message containing the question you want to ask the AI Agent.
-f, --files-pattern Files containing the questions to be passed to the AI Agent. Example: //.txt
-e, --exclude-pattern /.*, /*.halguru.yaml Exclude files that match this pattern.
-o, --output-file If specified, the answer will be written to the specified file.
-v, --verbose False Enables detailed output for debugging and troubleshooting purposes.

Summary#

Represents a command to interact with the AI Agent by posing questions and retrieving answers from the configured AI Agent. The command can process direct questions or read question files for batched queries.

Remarks#

The QuestionCommand utilizes specified configurations, such as agent definitions and session data, to execute queries against an AI Agent. It supports options for defining the agent, session, question input, and output behaviors.

Option -h, --help#

Prints help information

Gets a value indicating whether the license is valid.

This property checks if a valid license exists for the application. It returns true if the license is not null; otherwise, false.

Option -a, --agent-file#

The YAML file that defines the agent to be used.

Type: System.String

Represents the path to the YAML file that defines the configuration of the agent.

When the file name is not defined, it is searched for a file with the extension *.halguru in the current directory.

Option -s, --session-file#

The session file to run AI Robot with.

Type: System.String Default: state.halguru-state.yaml

Represents the file path to the session file used to run the AI Agent.

This file contains session-specific data required for the AI Agent to operate consistently. If not explicitly specified, the default value 'session.yaml' will be used.

Option -w, --write-session-on-exit#

If specified, the session file will be written on exit.

Type: System.Boolean Default: False

Indicates whether the session file should be written upon program exit.

When set to true, the session file used during the execution of the AI Robot will be updated or created upon exiting the application. This can be used to persist the current session state for future use.

Option -q, --question-message#

Message containing the question you want to ask the AI Agent.

Type: System.String

Represents the text of the question to be asked to the AI Agent.

This property allows a user to input a specific query intended for processing by the AI Agent. It is optional and can be used as a direct alternative to providing questions via files.

Option -f, --files-pattern#

Files containing the questions to be passed to the AI Agent. Example: //.txt

Type: System.String[]

Represents a collection of file paths containing questions to be passed to the AI agent.

This property allows specifying multiple files with a pattern for the questions to be processed. It supports wildcard patterns, such as //.txt, to include multiple files. If not set, no additional question files are provided to the AI agent.

Option -e, --exclude-pattern#

Exclude files that match this pattern.

Type: System.String[] Default: System.String[]

Specifies patterns used to exclude files during processing.

These patterns define file paths to be ignored, typically using wildcards or specific patterns. Default values include commonly excluded file patterns.

Option -o, --output-file#

If specified, the answer will be written to the specified file.

Type: System.String

Specifies the file path where the answer generated by the AI will be written, if provided.

When set, the output of the AI's response will be saved to the specified file. If not specified, the response will not be written to a file.

Option -v, --verbose#

Enables detailed output for debugging and troubleshooting purposes.

Type: System.Boolean Default: False

Specifies whether detailed output is enabled for debugging and troubleshooting purposes.

When set to true, additional information about the command execution process is displayed, which can be useful for diagnosing issues or understanding internal operations. By default, the value is false, indicating standard output only.

Option -h, --help#

Prints help information

Gets a value indicating whether the license is valid.

This property checks if a valid license exists for the application. It returns true if the license is not null; otherwise, false.

Option -a, --agent-file#

The YAML file that defines the agent to be used.

Type: System.String

Represents the path to the YAML file that defines the configuration of the agent.

When the file name is not defined, it is searched for a file with the extension *.halguru in the current directory.

Option -s, --session-file#

The session file to run AI Robot with.

Type: System.String Default: state.halguru-state.yaml

Represents the file path to the session file used to run the AI Agent.

This file contains session-specific data required for the AI Agent to operate consistently. If not explicitly specified, the default value 'session.yaml' will be used.

Option -w, --write-session-on-exit#

If specified, the session file will be written on exit.

Type: System.Boolean Default: False

Indicates whether the session file should be written upon program exit.

When set to true, the session file used during the execution of the AI Robot will be updated or created upon exiting the application. This can be used to persist the current session state for future use.

Option -q, --question-message#

Message containing the question you want to ask the AI Agent.

Type: System.String

Represents the text of the question to be asked to the AI Agent.

This property allows a user to input a specific query intended for processing by the AI Agent. It is optional and can be used as a direct alternative to providing questions via files.

Option -f, --files-pattern#

Files containing the questions to be passed to the AI Agent. Example: //.txt

Type: System.String[]

Represents a collection of file paths containing questions to be passed to the AI agent.

This property allows specifying multiple files with a pattern for the questions to be processed. It supports wildcard patterns, such as //.txt, to include multiple files. If not set, no additional question files are provided to the AI agent.

Option -e, --exclude-pattern#

Exclude files that match this pattern.

Type: System.String[] Default: System.String[]

Specifies patterns used to exclude files during processing.

These patterns define file paths to be ignored, typically using wildcards or specific patterns. Default values include commonly excluded file patterns.

Option -o, --output-file#

If specified, the answer will be written to the specified file.

Type: System.String

Specifies the file path where the answer generated by the AI will be written, if provided.

When set, the output of the AI's response will be saved to the specified file. If not specified, the response will not be written to a file.

Option -v, --verbose#

Enables detailed output for debugging and troubleshooting purposes.

Type: System.Boolean Default: False

Specifies whether detailed output is enabled for debugging and troubleshooting purposes.

When set to true, additional information about the command execution process is displayed, which can be useful for diagnosing issues or understanding internal operations. By default, the value is false, indicating standard output only.