ruby/resources/conversations/methods/retrieve/index.md +0 −57 deleted
File Deleted View Diff
1## Retrieve a conversation
2
3`conversations.retrieve(conversation_id) -> Conversation`
4
5**get** `/conversations/{conversation_id}`
6
7Get a conversation
8
9### Parameters
10
11- `conversation_id: String`
12
13### Returns
14
15- `class Conversation`
16
17 - `id: String`
18
19 The unique ID of the conversation.
20
21 - `created_at: Integer`
22
23 The time at which the conversation was created, measured in seconds since the Unix epoch.
24
25 - `metadata: untyped`
26
27 Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
28 Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
29
30 - `object: :conversation`
31
32 The object type, which is always `conversation`.
33
34 - `:conversation`
35
36### Example
37
38```ruby
39require "openai"
40
41openai = OpenAI::Client.new(api_key: "My API Key")
42
43conversation = openai.conversations.retrieve("conv_123")
44
45puts(conversation)
46```
47
48#### Response
49
50```json
51{
52 "id": "id",
53 "created_at": 0,
54 "metadata": {},
55 "object": "conversation"
56}
57```