Class: Handinger::Models::CreateWorker

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/handinger/models/create_worker.rb

Direct Known Subclasses

CreateTask, WorkerCreateParams

Defined Under Namespace

Modules: Visibility

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(instructions: nil, output_schema: nil, prompt: nil, summary: nil, title: nil, visibility: nil) ⇒ Object

Some parameter documentations has been truncated, see Handinger::Models::CreateWorker for more details.

Parameters:

  • instructions (String) (defaults to: nil)

    Persistent system prompt the worker uses for every task it runs.

  • output_schema (Hash{Symbol=>Object}) (defaults to: nil)

    Optional JSON Schema (Draft-07) describing the structured object the worker must

  • prompt (String) (defaults to: nil)

    Natural-language description of the worker to use for AI-generated instructions

  • summary (String) (defaults to: nil)

    Short one-line description of the worker’s purpose. Auto-generated when omitted

  • title (String) (defaults to: nil)

    Optional display name. When omitted, Handinger assigns a random dog-themed name.

  • visibility (Symbol, Handinger::Models::CreateWorker::Visibility) (defaults to: nil)

    ‘public` (default) is visible to all org members. `private` is only visible to i



# File 'lib/handinger/models/create_worker.rb', line 49

Instance Attribute Details

#instructionsString?

Persistent system prompt the worker uses for every task it runs.

Returns:

  • (String, nil)


10
# File 'lib/handinger/models/create_worker.rb', line 10

optional :instructions, String

#output_schemaHash{Symbol=>Object}?

Optional JSON Schema (Draft-07) describing the structured object the worker must produce. When set, every task response is validated against the schema and exposed as ‘structuredOutput`.

Returns:

  • (Hash{Symbol=>Object}, nil)


18
19
20
# File 'lib/handinger/models/create_worker.rb', line 18

optional :output_schema,
Handinger::Internal::Type::HashOf[Handinger::Internal::Type::Unknown],
api_name: :outputSchema

#promptString?

Natural-language description of the worker to use for AI-generated instructions when ‘instructions` is omitted.

Returns:

  • (String, nil)


27
# File 'lib/handinger/models/create_worker.rb', line 27

optional :prompt, String

#summaryString?

Short one-line description of the worker’s purpose. Auto-generated when omitted and a ‘prompt` is provided.

Returns:

  • (String, nil)


34
# File 'lib/handinger/models/create_worker.rb', line 34

optional :summary, String

#titleString?

Optional display name. When omitted, Handinger assigns a random dog-themed name.

Returns:

  • (String, nil)


40
# File 'lib/handinger/models/create_worker.rb', line 40

optional :title, String

#visibilitySymbol, ...

‘public` (default) is visible to all org members. `private` is only visible to invited members.



47
# File 'lib/handinger/models/create_worker.rb', line 47

optional :visibility, enum: -> { Handinger::CreateWorker::Visibility }