Module: Legion::Extensions::MicrosoftTeams::Helpers::TransformDefinitions

Defined in:
lib/legion/extensions/microsoft_teams/helpers/transform_definitions.rb

Class Method Summary collapse

Class Method Details

.conversation_extractObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/legion/extensions/microsoft_teams/helpers/transform_definitions.rb', line 10

def conversation_extract
  {
    name:           'teams.conversation.extract',
    structured:     true,
    prompt:         'Analyze this conversation between two people. Extract their communication ' \
                    'style, recurring topics, the nature of their working relationship, and any ' \
                    'pending action items. Be concise.',
    schema:         {
      type:       :object,
      properties: {
        communication_style:  { type: :string, description: 'How this person communicates (formal, casual, terse, detailed, etc.)' },
        topics:               { type: :array, items: { type: :string }, description: 'Recurring discussion topics' },
        relationship_context: { type: :string, description: 'Nature of working relationship (manager, peer, cross-team, mentor, etc.)' },
        action_items:         { type: :array, items: { type: :string }, description: 'Pending tasks or follow-ups' }
      },
      required:   %i[communication_style topics relationship_context action_items]
    },
    engine_options: { max_retries: 2 }
  }
end

.person_summaryObject



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/legion/extensions/microsoft_teams/helpers/transform_definitions.rb', line 31

def person_summary
  {
    name:           'teams.person.summary',
    structured:     true,
    prompt:         'Given this person profile data from Microsoft Teams, write a brief summary ' \
                    'of who this person is and their role. Keep it factual and concise.',
    schema:         {
      type:       :object,
      properties: {
        summary:       { type: :string, description: 'One-sentence summary of this person' },
        role_category: { type: :string, description: 'Role category: engineering, management, design, product, support, other' }
      },
      required:   %i[summary role_category]
    },
    engine_options: { max_retries: 1 }
  }
end