Class: LanggraphPlatform::Models::Assistant

Inherits:
Object
  • Object
show all
Defined in:
lib/langgraph_platform/models/assistant.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Assistant

Returns a new instance of Assistant.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/langgraph_platform/models/assistant.rb', line 7

def initialize(attributes)
  @assistant_id = attributes['assistant_id']
  @graph_id = attributes['graph_id']
  @config = attributes['config']
  @created_at = parse_time(attributes['created_at'])
  @updated_at = parse_time(attributes['updated_at'])
  @metadata = attributes['metadata'] || {}
  @version = attributes['version']
  @name = attributes['name']
  @description = attributes['description']
end

Instance Attribute Details

#assistant_id ⇒ Object (readonly)

Returns the value of attribute assistant_id.



4
5
6
# File 'lib/langgraph_platform/models/assistant.rb', line 4

def assistant_id
  @assistant_id
end

#config ⇒ Object (readonly)

Returns the value of attribute config.



4
5
6
# File 'lib/langgraph_platform/models/assistant.rb', line 4

def config
  @config
end

#created_at ⇒ Object (readonly)

Returns the value of attribute created_at.



4
5
6
# File 'lib/langgraph_platform/models/assistant.rb', line 4

def created_at
  @created_at
end

#description ⇒ Object (readonly)

Returns the value of attribute description.



4
5
6
# File 'lib/langgraph_platform/models/assistant.rb', line 4

def description
  @description
end

#graph_id ⇒ Object (readonly)

Returns the value of attribute graph_id.



4
5
6
# File 'lib/langgraph_platform/models/assistant.rb', line 4

def graph_id
  @graph_id
end

#metadata ⇒ Object (readonly)

Returns the value of attribute metadata.



4
5
6
# File 'lib/langgraph_platform/models/assistant.rb', line 4

def 
  @metadata
end

#name ⇒ Object (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/langgraph_platform/models/assistant.rb', line 4

def name
  @name
end

#updated_at ⇒ Object (readonly)

Returns the value of attribute updated_at.



4
5
6
# File 'lib/langgraph_platform/models/assistant.rb', line 4

def updated_at
  @updated_at
end

#version ⇒ Object (readonly)

Returns the value of attribute version.



4
5
6
# File 'lib/langgraph_platform/models/assistant.rb', line 4

def version
  @version
end

Instance Method Details

#to_h ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/langgraph_platform/models/assistant.rb', line 19

def to_h
  {
    assistant_id: @assistant_id,
    graph_id: @graph_id,
    config: @config,
    created_at: @created_at,
    updated_at: @updated_at,
    metadata: @metadata,
    version: @version,
    name: @name,
    description: @description
  }
end

#to_json(*args) ⇒ Object



33
34
35
# File 'lib/langgraph_platform/models/assistant.rb', line 33

def to_json(*args)
  to_h.to_json(*args)
end