memori-client 0.1.6 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/doc/MemoriClient::Backend::V1::Asset.md +117 -0
- data/doc/MemoriClient::Backend::V2::ActionLog.md +37 -0
- data/doc/MemoriClient::Backend::V2::Analysis.md +39 -0
- data/doc/MemoriClient::Backend::V2::Asset.md +102 -0
- data/doc/MemoriClient::Backend::V2::Badge.md +64 -0
- data/doc/MemoriClient::Backend::V2::CompletionConfig.md +115 -0
- data/doc/MemoriClient::Backend::V2::ConsumptionLog.md +57 -0
- data/doc/MemoriClient::Backend::V2::ImportExport.md +180 -0
- data/doc/MemoriClient::Backend::V2::Integration.md +117 -0
- data/doc/MemoriClient::Backend::V2::Invitation.md +179 -0
- data/doc/MemoriClient::Backend::V2::Memori.md +394 -0
- data/doc/MemoriClient::Backend::V2::MemoriList.md +147 -0
- data/doc/MemoriClient::Backend::V2::Notification.md +31 -0
- data/doc/MemoriClient::Backend::V2::Process.md +64 -0
- data/doc/MemoriClient::Backend::V2::Tenant.md +142 -0
- data/doc/MemoriClient::Backend::V2::User.md +647 -0
- data/doc/MemoriClient::Engine::V2::ChatLog.md +82 -0
- data/doc/MemoriClient::Engine::V2::ContextVar.md +46 -0
- data/doc/MemoriClient::Engine::V2::CorrelationPair.md +72 -0
- data/doc/MemoriClient::Engine::V2::CustomDictionary.md +108 -0
- data/doc/MemoriClient::Engine::V2::Dialog.md +152 -0
- data/doc/MemoriClient::Engine::V2::EventLog.md +85 -0
- data/doc/MemoriClient::Engine::V2::ExpertReference.md +116 -0
- data/doc/MemoriClient::Engine::V2::Function.md +140 -0
- data/doc/MemoriClient::Engine::V2::Intent.md +225 -0
- data/doc/MemoriClient::Engine::V2::LocalizationKey.md +105 -0
- data/doc/MemoriClient::Engine::V2::Medium.md +118 -0
- data/doc/MemoriClient::Engine::V2::Memory.md +244 -0
- data/doc/MemoriClient::Engine::V2::NLP.md +100 -0
- data/doc/MemoriClient::Engine::V2::Person.md +114 -0
- data/doc/MemoriClient::Engine::V2::Search.md +151 -0
- data/doc/MemoriClient::Engine::V2::Session.md +55 -0
- data/doc/MemoriClient::Engine::V2::Stat.md +18 -0
- data/doc/MemoriClient::Engine::V2::Topic.md +80 -0
- data/doc/MemoriClient::Engine::V2::UnansweredQuestion.md +75 -0
- data/doc/MemoriClient::Engine::V2::User.md +140 -0
- data/doc/MemoriClient::Engine::V2::WebHook.md +67 -0
- data/lib/memori_client/railtie.rb +12 -0
- data/lib/memori_client/utils/rails.rb +54 -0
- data/lib/memori_client.rb +7 -0
- data/lib/tasks/memori_client.rake +15 -0
- metadata +42 -2
@@ -0,0 +1,80 @@
|
|
1
|
+
# Module `MemoriClient::Engine::V2::Topic`
|
2
|
+
|
3
|
+
## list_topics
|
4
|
+
|
5
|
+
Summary:
|
6
|
+
Lists all Topic objects.
|
7
|
+
|
8
|
+
Signature: `list_topics(strSessionID:)`
|
9
|
+
Invocation: `MemoriClient::Engine::V2::Topic.list_topics(strSessionID:)`
|
10
|
+
|
11
|
+
HTTP API: GET /memori/v2/Topics/{strSessionID}`
|
12
|
+
|
13
|
+
Parameters:
|
14
|
+
|
15
|
+
- `strSessionID`: **string** The session ID. required
|
16
|
+
|
17
|
+
## list_topics_paginated
|
18
|
+
|
19
|
+
Summary:
|
20
|
+
Lists Topic objects with pagination.
|
21
|
+
|
22
|
+
Signature: `list_topics_paginated(strSessionID:, from:, howMany:)`
|
23
|
+
Invocation: `MemoriClient::Engine::V2::Topic.list_topics_paginated(strSessionID:, from:, howMany:)`
|
24
|
+
|
25
|
+
HTTP API: GET /memori/v2/Topics/{strSessionID}/{from}/{howMany}`
|
26
|
+
|
27
|
+
Parameters:
|
28
|
+
|
29
|
+
- `strSessionID`: **string** The session ID. required
|
30
|
+
- `from`: **integer** The 0-based index of the first Topic object to list. required
|
31
|
+
- `howMany`: **integer** The number of the Topic objects to list. required
|
32
|
+
|
33
|
+
## get_topic
|
34
|
+
|
35
|
+
Summary:
|
36
|
+
Gets the details of a Topic object.
|
37
|
+
|
38
|
+
Signature: `get_topic(strSessionID:, strTopicID:)`
|
39
|
+
Invocation: `MemoriClient::Engine::V2::Topic.get_topic(strSessionID:, strTopicID:)`
|
40
|
+
|
41
|
+
HTTP API: GET /memori/v2/Topic/{strSessionID}/{strTopicID}`
|
42
|
+
|
43
|
+
Parameters:
|
44
|
+
|
45
|
+
- `strSessionID`: **string** The session ID. required
|
46
|
+
- `strTopicID`: **string** The Topic object ID. required
|
47
|
+
|
48
|
+
## list_topic_users
|
49
|
+
|
50
|
+
Summary:
|
51
|
+
Lists all User objects referencing a specified Topic object.
|
52
|
+
|
53
|
+
Signature: `list_topic_users(strSessionID:, strTopicID:)`
|
54
|
+
Invocation: `MemoriClient::Engine::V2::Topic.list_topic_users(strSessionID:, strTopicID:)`
|
55
|
+
|
56
|
+
HTTP API: GET /memori/v2/TopicUsers/{strSessionID}/{strTopicID}`
|
57
|
+
|
58
|
+
Parameters:
|
59
|
+
|
60
|
+
- `strSessionID`: **string** The session ID. required
|
61
|
+
- `strTopicID`: **string** The Topic object ID. required
|
62
|
+
|
63
|
+
## list_topic_users_paginated
|
64
|
+
|
65
|
+
Summary:
|
66
|
+
Lists User objects referencing a specified User object, with pagination.
|
67
|
+
|
68
|
+
Signature: `list_topic_users_paginated(strSessionID:, strTopicID:, from:, howMany:)`
|
69
|
+
Invocation: `MemoriClient::Engine::V2::Topic.list_topic_users_paginated(strSessionID:, strTopicID:, from:, howMany:)`
|
70
|
+
|
71
|
+
HTTP API: GET /memori/v2/TopicUsers/{strSessionID}/{strTopicID}/{from}/{howMany}`
|
72
|
+
|
73
|
+
Parameters:
|
74
|
+
|
75
|
+
- `strSessionID`: **string** The session ID. required
|
76
|
+
- `strTopicID`: **string** The Topic object ID. required
|
77
|
+
- `from`: **integer** The 0-based index of the first User object to list. required
|
78
|
+
- `howMany`: **integer** The number of User objects to list. required
|
79
|
+
|
80
|
+
|
@@ -0,0 +1,75 @@
|
|
1
|
+
# Module `MemoriClient::Engine::V2::UnansweredQuestion`
|
2
|
+
|
3
|
+
## list_unanswered_questions
|
4
|
+
|
5
|
+
Summary:
|
6
|
+
Lists all Unanswered Question objects.
|
7
|
+
|
8
|
+
Signature: `list_unanswered_questions(strSessionID:)`
|
9
|
+
Invocation: `MemoriClient::Engine::V2::UnansweredQuestion.list_unanswered_questions(strSessionID:)`
|
10
|
+
|
11
|
+
HTTP API: GET /memori/v2/UnansweredQuestions/{strSessionID}`
|
12
|
+
|
13
|
+
Parameters:
|
14
|
+
|
15
|
+
- `strSessionID`: **string** The session ID. required
|
16
|
+
|
17
|
+
## list_unanswered_questions_paginated
|
18
|
+
|
19
|
+
Summary:
|
20
|
+
Lists Unanswered Question objects with pagination.
|
21
|
+
|
22
|
+
Signature: `list_unanswered_questions_paginated(strSessionID:, from:, howMany:)`
|
23
|
+
Invocation: `MemoriClient::Engine::V2::UnansweredQuestion.list_unanswered_questions_paginated(strSessionID:, from:, howMany:)`
|
24
|
+
|
25
|
+
HTTP API: GET /memori/v2/UnansweredQuestions/{strSessionID}/{from}/{howMany}`
|
26
|
+
|
27
|
+
Parameters:
|
28
|
+
|
29
|
+
- `strSessionID`: **string** The session ID. required
|
30
|
+
- `from`: **integer** The 0-based index of the first Unanswered Question object to list. required
|
31
|
+
- `howMany`: **integer** The number of the Unanswered Question objects to list. required
|
32
|
+
|
33
|
+
## add_unanswered_question
|
34
|
+
|
35
|
+
Summary:
|
36
|
+
Adds a new Unanswered Question object.
|
37
|
+
|
38
|
+
Signature: `add_unanswered_question(strSessionID:, payload: {})`
|
39
|
+
Invocation: `MemoriClient::Engine::V2::UnansweredQuestion.add_unanswered_question(strSessionID:, payload: {})`
|
40
|
+
|
41
|
+
HTTP API: POST /memori/v2/UnansweredQuestion/{strSessionID}`
|
42
|
+
|
43
|
+
Parameters:
|
44
|
+
|
45
|
+
- `strSessionID`: **string** The session ID. required
|
46
|
+
- `payload`: **Hash** request payload. optional
|
47
|
+
- `payload.unansweredQuestionID`: **String** . optional
|
48
|
+
- `payload.text`: **String** . optional
|
49
|
+
- `payload.contextVars`: **Object** . optional
|
50
|
+
- `payload.occurrences`: **Integer** . optional
|
51
|
+
- `payload.receiverID`: **String** . optional
|
52
|
+
- `payload.receiverTag`: **String** . optional
|
53
|
+
- `payload.receiverName`: **String** . optional
|
54
|
+
- `payload.suggestions`: **Array** . optional
|
55
|
+
- `payload.creationTimestamp`: **String** . optional
|
56
|
+
- `payload.creationSessionID`: **String** . optional
|
57
|
+
- `payload.lastChangeTimestamp`: **String** . optional
|
58
|
+
- `payload.lastChangeSessionID`: **String** . optional
|
59
|
+
|
60
|
+
## remove_unanswered_question
|
61
|
+
|
62
|
+
Summary:
|
63
|
+
Removes an existing Unanswered Question object.
|
64
|
+
|
65
|
+
Signature: `remove_unanswered_question(strSessionID:, strUnansweredQuestionID:)`
|
66
|
+
Invocation: `MemoriClient::Engine::V2::UnansweredQuestion.remove_unanswered_question(strSessionID:, strUnansweredQuestionID:)`
|
67
|
+
|
68
|
+
HTTP API: DELETE /memori/v2/UnansweredQuestion/{strSessionID}/{strUnansweredQuestionID}`
|
69
|
+
|
70
|
+
Parameters:
|
71
|
+
|
72
|
+
- `strSessionID`: **string** The session ID. required
|
73
|
+
- `strUnansweredQuestionID`: **string** The Unanswered Question object ID. required
|
74
|
+
|
75
|
+
|
@@ -0,0 +1,140 @@
|
|
1
|
+
# Module `MemoriClient::Engine::V2::User`
|
2
|
+
|
3
|
+
## list_users
|
4
|
+
|
5
|
+
Summary:
|
6
|
+
Lists all User objects associated with the Memori of the current session.
|
7
|
+
|
8
|
+
Signature: `list_users(strSessionID:)`
|
9
|
+
Invocation: `MemoriClient::Engine::V2::User.list_users(strSessionID:)`
|
10
|
+
|
11
|
+
HTTP API: GET /memori/v2/Users/{strSessionID}`
|
12
|
+
|
13
|
+
Parameters:
|
14
|
+
|
15
|
+
- `strSessionID`: **string** The session ID. required
|
16
|
+
|
17
|
+
## list_users_paginated
|
18
|
+
|
19
|
+
Summary:
|
20
|
+
Lists User objects associated with the Memori of the current session, with pagination.
|
21
|
+
|
22
|
+
Signature: `list_users_paginated(strSessionID:, from:, howMany:)`
|
23
|
+
Invocation: `MemoriClient::Engine::V2::User.list_users_paginated(strSessionID:, from:, howMany:)`
|
24
|
+
|
25
|
+
HTTP API: GET /memori/v2/Users/{strSessionID}/{from}/{howMany}`
|
26
|
+
|
27
|
+
Parameters:
|
28
|
+
|
29
|
+
- `strSessionID`: **string** The session ID. required
|
30
|
+
- `from`: **integer** The 0-based index of the first User to list. required
|
31
|
+
- `howMany`: **integer** The number of User objects to list. required
|
32
|
+
|
33
|
+
## get_user
|
34
|
+
|
35
|
+
Summary:
|
36
|
+
Gets the details of a User object.
|
37
|
+
|
38
|
+
Signature: `get_user(strSessionID:, strUserID:)`
|
39
|
+
Invocation: `MemoriClient::Engine::V2::User.get_user(strSessionID:, strUserID:)`
|
40
|
+
|
41
|
+
HTTP API: GET /memori/v2/User/{strSessionID}/{strUserID}`
|
42
|
+
|
43
|
+
Parameters:
|
44
|
+
|
45
|
+
- `strSessionID`: **string** The session ID. required
|
46
|
+
- `strUserID`: **string** The User object ID. required
|
47
|
+
|
48
|
+
## list_user_topics
|
49
|
+
|
50
|
+
Summary:
|
51
|
+
Lists all Topic objects referenced by a specified User object.
|
52
|
+
|
53
|
+
Signature: `list_user_topics(strSessionID:, strUserID:)`
|
54
|
+
Invocation: `MemoriClient::Engine::V2::User.list_user_topics(strSessionID:, strUserID:)`
|
55
|
+
|
56
|
+
HTTP API: GET /memori/v2/UserTopics/{strSessionID}/{strUserID}`
|
57
|
+
|
58
|
+
Parameters:
|
59
|
+
|
60
|
+
- `strSessionID`: **string** The session ID. required
|
61
|
+
- `strUserID`: **string** The User object ID. required
|
62
|
+
|
63
|
+
## list_user_topics_paginated
|
64
|
+
|
65
|
+
Summary:
|
66
|
+
Lists Topic objects referenced by a specified User object, with pagination.
|
67
|
+
|
68
|
+
Signature: `list_user_topics_paginated(strSessionID:, strUserID:, from:, howMany:)`
|
69
|
+
Invocation: `MemoriClient::Engine::V2::User.list_user_topics_paginated(strSessionID:, strUserID:, from:, howMany:)`
|
70
|
+
|
71
|
+
HTTP API: GET /memori/v2/UserTopics/{strSessionID}/{strUserID}/{from}/{howMany}`
|
72
|
+
|
73
|
+
Parameters:
|
74
|
+
|
75
|
+
- `strSessionID`: **string** The session ID. required
|
76
|
+
- `strUserID`: **string** The User object ID. required
|
77
|
+
- `from`: **integer** The 0-based index of the first Topic object to list. required
|
78
|
+
- `howMany`: **integer** The number of Topic objects to list. required
|
79
|
+
|
80
|
+
## list_known_facts
|
81
|
+
|
82
|
+
Summary:
|
83
|
+
Lists all Known Facts objects associated with the current User.
|
84
|
+
|
85
|
+
Signature: `list_known_facts(strSessionID:)`
|
86
|
+
Invocation: `MemoriClient::Engine::V2::User.list_known_facts(strSessionID:)`
|
87
|
+
|
88
|
+
HTTP API: GET /memori/v2/KnownFacts/{strSessionID}`
|
89
|
+
|
90
|
+
Parameters:
|
91
|
+
|
92
|
+
- `strSessionID`: **string** The session ID. required
|
93
|
+
|
94
|
+
## list_known_facts_paginated
|
95
|
+
|
96
|
+
Summary:
|
97
|
+
Lists Known Facts objects associated with the current User, with pagination.
|
98
|
+
|
99
|
+
Signature: `list_known_facts_paginated(strSessionID:, from:, howMany:)`
|
100
|
+
Invocation: `MemoriClient::Engine::V2::User.list_known_facts_paginated(strSessionID:, from:, howMany:)`
|
101
|
+
|
102
|
+
HTTP API: GET /memori/v2/KnownFacts/{strSessionID}/{from}/{howMany}`
|
103
|
+
|
104
|
+
Parameters:
|
105
|
+
|
106
|
+
- `strSessionID`: **string** The session ID. required
|
107
|
+
- `from`: **integer** The 0-based index of the first Known Fact to list. required
|
108
|
+
- `howMany`: **integer** The number of Known Fact objects to list. required
|
109
|
+
|
110
|
+
## get_known_fact
|
111
|
+
|
112
|
+
Summary:
|
113
|
+
Gets the details of a Known Fact object.
|
114
|
+
|
115
|
+
Signature: `get_known_fact(strSessionID:, strKnownFactID:)`
|
116
|
+
Invocation: `MemoriClient::Engine::V2::User.get_known_fact(strSessionID:, strKnownFactID:)`
|
117
|
+
|
118
|
+
HTTP API: GET /memori/v2/KnownFact/{strSessionID}/{strKnownFactID}`
|
119
|
+
|
120
|
+
Parameters:
|
121
|
+
|
122
|
+
- `strSessionID`: **string** The session ID. required
|
123
|
+
- `strKnownFactID`: **string** The Known Fact object ID. required
|
124
|
+
|
125
|
+
## delete_known_fact
|
126
|
+
|
127
|
+
Summary:
|
128
|
+
Deletes an existing Known Fact object.
|
129
|
+
|
130
|
+
Signature: `delete_known_fact(strSessionID:, strKnownFactID:)`
|
131
|
+
Invocation: `MemoriClient::Engine::V2::User.delete_known_fact(strSessionID:, strKnownFactID:)`
|
132
|
+
|
133
|
+
HTTP API: DELETE /memori/v2/KnownFact/{strSessionID}/{strKnownFactID}`
|
134
|
+
|
135
|
+
Parameters:
|
136
|
+
|
137
|
+
- `strSessionID`: **string** The session ID. required
|
138
|
+
- `strKnownFactID`: **string** The Known Fact object ID. required
|
139
|
+
|
140
|
+
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# Module `MemoriClient::Engine::V2::WebHook`
|
2
|
+
|
3
|
+
## test_slot
|
4
|
+
|
5
|
+
Summary:
|
6
|
+
Returns test slot values.
|
7
|
+
|
8
|
+
Signature: `test_slot(payload: {})`
|
9
|
+
Invocation: `MemoriClient::Engine::V2::WebHook.test_slot(payload: {})`
|
10
|
+
|
11
|
+
HTTP API: POST /memori/v2/TestSlot`
|
12
|
+
|
13
|
+
Parameters:
|
14
|
+
|
15
|
+
- `payload`: **Hash** request payload. optional
|
16
|
+
- `payload.slotName`: **String** . optional
|
17
|
+
- `payload.requestID`: **Integer** . optional
|
18
|
+
- `payload.requestDateTime`: **String** . optional
|
19
|
+
- `payload.requestValidityMinutes`: **Number** . optional
|
20
|
+
- `payload.memoriID`: **String** . optional
|
21
|
+
- `payload.culture`: **String** . optional
|
22
|
+
|
23
|
+
## test_intent
|
24
|
+
|
25
|
+
Summary:
|
26
|
+
Returns test intent results.
|
27
|
+
|
28
|
+
Signature: `test_intent(payload: {})`
|
29
|
+
Invocation: `MemoriClient::Engine::V2::WebHook.test_intent(payload: {})`
|
30
|
+
|
31
|
+
HTTP API: POST /memori/v2/TestIntent`
|
32
|
+
|
33
|
+
Parameters:
|
34
|
+
|
35
|
+
- `payload`: **Hash** request payload. optional
|
36
|
+
- `payload.intentName`: **String** . optional
|
37
|
+
- `payload.utterance`: **String** . optional
|
38
|
+
- `payload.slotValues`: **Object** . optional
|
39
|
+
- `payload.sessionID`: **String** . optional
|
40
|
+
- `payload.currentTag`: **String** . optional
|
41
|
+
- `payload.currentTagAuthenticated`: **Boolean** . optional
|
42
|
+
- `payload.currentDateUTC`: **String** . optional
|
43
|
+
- `payload.currentPlace`: **** . optional
|
44
|
+
- `payload.timeZone`: **String** . optional
|
45
|
+
- `payload.beginUTC`: **String** . optional
|
46
|
+
- `payload.endUTC`: **String** . optional
|
47
|
+
- `payload.contextVars`: **Object** . optional
|
48
|
+
- `payload.transitionHistory`: **Array** . optional
|
49
|
+
- `payload.userEmail`: **String** . optional
|
50
|
+
- `payload.requestID`: **Integer** . optional
|
51
|
+
- `payload.requestDateTime`: **String** . optional
|
52
|
+
- `payload.requestValidityMinutes`: **Number** . optional
|
53
|
+
- `payload.memoriID`: **String** . optional
|
54
|
+
- `payload.culture`: **String** . optional
|
55
|
+
|
56
|
+
## test_function_random_number
|
57
|
+
|
58
|
+
Summary:
|
59
|
+
Test function: returns a random number between 0 and 999999.
|
60
|
+
|
61
|
+
Signature: `test_function_random_number()`
|
62
|
+
Invocation: `MemoriClient::Engine::V2::WebHook.test_function_random_number()`
|
63
|
+
|
64
|
+
HTTP API: GET /memori/v2/TestFunctions/RandomNumber`
|
65
|
+
|
66
|
+
|
67
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module MemoriClient
|
2
|
+
class Railtie < Rails::Railtie
|
3
|
+
puts "Loading MemoriClient Railtie"
|
4
|
+
rake_tasks do
|
5
|
+
puts "Loading MemoriClient Rake tasks"
|
6
|
+
file = File.expand_path('../../tasks/memori_client.rake', __FILE__)
|
7
|
+
puts "Loading Rake tasks from #{file}"
|
8
|
+
raise "Rake tasks file not found: #{file}" unless File.exist?(file)
|
9
|
+
load File.expand_path('../../tasks/memori_client.rake', __FILE__)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module MemoriClient
|
2
|
+
module Utils
|
3
|
+
module Rails
|
4
|
+
def self.copy_docs
|
5
|
+
# Find gem's root directory
|
6
|
+
gem_root = Gem.loaded_specs['memori-client'].gem_dir rescue nil
|
7
|
+
unless gem_root
|
8
|
+
puts "Error: Could not find memori_client gem installation"
|
9
|
+
exit 1
|
10
|
+
end
|
11
|
+
|
12
|
+
# Determine project root (works in Rails and non-Rails)
|
13
|
+
project_root = if defined?(::Rails)
|
14
|
+
::Rails.root.to_s
|
15
|
+
else
|
16
|
+
Dir.pwd
|
17
|
+
end
|
18
|
+
|
19
|
+
source_docs = File.join(gem_root, 'doc')
|
20
|
+
dest_docs = File.join(project_root, 'doc', 'memori_client')
|
21
|
+
|
22
|
+
# Create destination directory if needed
|
23
|
+
FileUtils.mkdir_p(dest_docs) unless Dir.exist?(dest_docs)
|
24
|
+
|
25
|
+
# Copy all documentation files
|
26
|
+
if Dir.exist?(source_docs)
|
27
|
+
FileUtils.cp_r(Dir.glob(File.join(source_docs, '*')), dest_docs)
|
28
|
+
puts "MemoriClient documentation copied to #{dest_docs}"
|
29
|
+
else
|
30
|
+
puts "No documentation found in the gem"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.copy_initializer
|
35
|
+
template = <<~RUBY
|
36
|
+
# Path: config/initializers/memori_client.rb
|
37
|
+
require 'memori_client'
|
38
|
+
MemoriClient.configure do |config|
|
39
|
+
config.backend_api_root = ENV['MEMORI_BACKEND_API_ROOT']
|
40
|
+
config.backend_api_username = ENV['MEMORI_BACKEND_API_USERNAME']
|
41
|
+
config.backend_api_password = ENV['MEMORI_BACKEND_API_PASSWORD']
|
42
|
+
config.backend_api_tenant = ENV['MEMORI_BACKEND_API_TENANT']
|
43
|
+
config.engine_api_root = ENV['MEMORI_ENGINE_API_ROOT']
|
44
|
+
end
|
45
|
+
RUBY
|
46
|
+
|
47
|
+
initializer_path = ::Rails.root.join('config', 'initializers', 'memori_client.rb')
|
48
|
+
File.open(initializer_path, 'w') do |file|
|
49
|
+
file.write(template)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
data/lib/memori_client.rb
CHANGED
@@ -44,6 +44,12 @@ end
|
|
44
44
|
require 'securerandom'
|
45
45
|
require 'uri'
|
46
46
|
require 'json'
|
47
|
+
|
48
|
+
if defined?(::Rails)
|
49
|
+
require 'memori_client/utils/rails'
|
50
|
+
require 'memori_client/railtie'
|
51
|
+
end
|
52
|
+
|
47
53
|
require 'memori_client/configuration'
|
48
54
|
require "memori_client/http_client"
|
49
55
|
require "memori_client/resource"
|
@@ -56,3 +62,4 @@ require "memori_client/engine/resources"
|
|
56
62
|
require "memori_client/engine/v2/private/memori"
|
57
63
|
require "memori_client/engine/v2/private/memori_block"
|
58
64
|
|
65
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
namespace :memori_client do
|
2
|
+
namespace :docs do
|
3
|
+
desc "Copy MemoriClient documentation to Rails public directory"
|
4
|
+
task :copy do
|
5
|
+
MemoriClient::Utils::Rails.copy_docs
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
namespace :config do
|
10
|
+
desc "Copy MemoriClient initializer to Rails config/initializers"
|
11
|
+
task :copy_initializer do
|
12
|
+
MemoriClient::Utils::Rails.copy_initializer
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: memori-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefano Lampis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Memori Client to interact with Memori backend and engine API
|
14
14
|
email: me@stefanolampis.com
|
@@ -16,6 +16,43 @@ executables: []
|
|
16
16
|
extensions: []
|
17
17
|
extra_rdoc_files: []
|
18
18
|
files:
|
19
|
+
- doc/MemoriClient::Backend::V1::Asset.md
|
20
|
+
- doc/MemoriClient::Backend::V2::ActionLog.md
|
21
|
+
- doc/MemoriClient::Backend::V2::Analysis.md
|
22
|
+
- doc/MemoriClient::Backend::V2::Asset.md
|
23
|
+
- doc/MemoriClient::Backend::V2::Badge.md
|
24
|
+
- doc/MemoriClient::Backend::V2::CompletionConfig.md
|
25
|
+
- doc/MemoriClient::Backend::V2::ConsumptionLog.md
|
26
|
+
- doc/MemoriClient::Backend::V2::ImportExport.md
|
27
|
+
- doc/MemoriClient::Backend::V2::Integration.md
|
28
|
+
- doc/MemoriClient::Backend::V2::Invitation.md
|
29
|
+
- doc/MemoriClient::Backend::V2::Memori.md
|
30
|
+
- doc/MemoriClient::Backend::V2::MemoriList.md
|
31
|
+
- doc/MemoriClient::Backend::V2::Notification.md
|
32
|
+
- doc/MemoriClient::Backend::V2::Process.md
|
33
|
+
- doc/MemoriClient::Backend::V2::Tenant.md
|
34
|
+
- doc/MemoriClient::Backend::V2::User.md
|
35
|
+
- doc/MemoriClient::Engine::V2::ChatLog.md
|
36
|
+
- doc/MemoriClient::Engine::V2::ContextVar.md
|
37
|
+
- doc/MemoriClient::Engine::V2::CorrelationPair.md
|
38
|
+
- doc/MemoriClient::Engine::V2::CustomDictionary.md
|
39
|
+
- doc/MemoriClient::Engine::V2::Dialog.md
|
40
|
+
- doc/MemoriClient::Engine::V2::EventLog.md
|
41
|
+
- doc/MemoriClient::Engine::V2::ExpertReference.md
|
42
|
+
- doc/MemoriClient::Engine::V2::Function.md
|
43
|
+
- doc/MemoriClient::Engine::V2::Intent.md
|
44
|
+
- doc/MemoriClient::Engine::V2::LocalizationKey.md
|
45
|
+
- doc/MemoriClient::Engine::V2::Medium.md
|
46
|
+
- doc/MemoriClient::Engine::V2::Memory.md
|
47
|
+
- doc/MemoriClient::Engine::V2::NLP.md
|
48
|
+
- doc/MemoriClient::Engine::V2::Person.md
|
49
|
+
- doc/MemoriClient::Engine::V2::Search.md
|
50
|
+
- doc/MemoriClient::Engine::V2::Session.md
|
51
|
+
- doc/MemoriClient::Engine::V2::Stat.md
|
52
|
+
- doc/MemoriClient::Engine::V2::Topic.md
|
53
|
+
- doc/MemoriClient::Engine::V2::UnansweredQuestion.md
|
54
|
+
- doc/MemoriClient::Engine::V2::User.md
|
55
|
+
- doc/MemoriClient::Engine::V2::WebHook.md
|
19
56
|
- lib/memori_client.rb
|
20
57
|
- lib/memori_client/backend/resource.rb
|
21
58
|
- lib/memori_client/backend/resources.rb
|
@@ -66,7 +103,10 @@ files:
|
|
66
103
|
- lib/memori_client/engine/v2/user.rb
|
67
104
|
- lib/memori_client/engine/v2/web_hook.rb
|
68
105
|
- lib/memori_client/http_client.rb
|
106
|
+
- lib/memori_client/railtie.rb
|
69
107
|
- lib/memori_client/resource.rb
|
108
|
+
- lib/memori_client/utils/rails.rb
|
109
|
+
- lib/tasks/memori_client.rake
|
70
110
|
homepage: https://rubygems.org/gems/memori_client-client
|
71
111
|
licenses:
|
72
112
|
- MIT
|