@futdevpro/nts-dynamo 1.14.35 → 1.14.37

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.
Files changed (58) hide show
  1. package/build/_modules/ai/_models/ai-input-interfaces.d.ts +20 -28
  2. package/build/_modules/ai/_models/ai-input-interfaces.d.ts.map +1 -1
  3. package/build/_modules/ai/_models/ai-input-interfaces.js +3 -0
  4. package/build/_modules/ai/_models/ai-input-interfaces.js.map +1 -1
  5. package/build/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.d.ts +14 -58
  6. package/build/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.d.ts.map +1 -1
  7. package/build/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.js +138 -147
  8. package/build/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.js.map +1 -1
  9. package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.d.ts +27 -180
  10. package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.d.ts.map +1 -1
  11. package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.js +147 -328
  12. package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.js.map +1 -1
  13. package/build/_modules/ai/_services/ai-llm-chat.service-base.d.ts +22 -14
  14. package/build/_modules/ai/_services/ai-llm-chat.service-base.d.ts.map +1 -1
  15. package/build/_modules/ai/_services/ai-llm-chat.service-base.js.map +1 -1
  16. package/build/_modules/ai/_services/ai-llm.service-base.d.ts +52 -21
  17. package/build/_modules/ai/_services/ai-llm.service-base.d.ts.map +1 -1
  18. package/build/_modules/ai/_services/ai-llm.service-base.js +171 -0
  19. package/build/_modules/ai/_services/ai-llm.service-base.js.map +1 -1
  20. package/build/_modules/ai/_services/ai-provider.service-base.d.ts +1 -1
  21. package/build/_modules/ai/_services/ai-provider.service-base.d.ts.map +1 -1
  22. package/build/_modules/assistant/_services/ass-io.control-service.js +2 -2
  23. package/build/_modules/assistant/_services/ass-io.control-service.js.map +1 -1
  24. package/build/_modules/bot/_models/bot-channel-wrapper.interface.d.ts +8 -2
  25. package/build/_modules/bot/_models/bot-channel-wrapper.interface.d.ts.map +1 -1
  26. package/build/_modules/bot/_models/bot-channel-wrapper.interface.js +31 -0
  27. package/build/_modules/bot/_models/bot-channel-wrapper.interface.js.map +1 -1
  28. package/build/_modules/bot/_models/bot-message-wrapper.interface.d.ts +6 -1
  29. package/build/_modules/bot/_models/bot-message-wrapper.interface.d.ts.map +1 -1
  30. package/build/_modules/bot/_models/bot-message-wrapper.interface.js +39 -0
  31. package/build/_modules/bot/_models/bot-message-wrapper.interface.js.map +1 -1
  32. package/build/_modules/bot/_models/bot-user-wrapper.interface.d.ts +2 -1
  33. package/build/_modules/bot/_models/bot-user-wrapper.interface.d.ts.map +1 -1
  34. package/build/_modules/bot/_models/bot-user-wrapper.interface.js +18 -0
  35. package/build/_modules/bot/_models/bot-user-wrapper.interface.js.map +1 -1
  36. package/build/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.js +9 -6
  37. package/build/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.js.map +1 -1
  38. package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.js +9 -6
  39. package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.js.map +1 -1
  40. package/build/_modules/discord-assistant/_services/dias-chunk.data-service.js +9 -9
  41. package/build/_modules/discord-assistant/_services/dias-chunk.data-service.js.map +1 -1
  42. package/build/_modules/discord-assistant/_services/dias-io.control-service.js +2 -2
  43. package/build/_modules/discord-assistant/_services/dias-io.control-service.js.map +1 -1
  44. package/package.json +1 -1
  45. package/src/_modules/ai/_models/ai-input-interfaces.ts +63 -26
  46. package/src/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.ts +99 -139
  47. package/src/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.ts +246 -294
  48. package/src/_modules/ai/_services/ai-llm-chat.service-base.ts +36 -16
  49. package/src/_modules/ai/_services/ai-llm.service-base.ts +272 -28
  50. package/src/_modules/ai/_services/ai-provider.service-base.ts +1 -1
  51. package/src/_modules/assistant/_services/ass-io.control-service.ts +2 -2
  52. package/src/_modules/bot/_models/bot-channel-wrapper.interface.ts +30 -4
  53. package/src/_modules/bot/_models/bot-message-wrapper.interface.ts +24 -2
  54. package/src/_modules/bot/_models/bot-user-wrapper.interface.ts +8 -2
  55. package/src/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.ts +6 -6
  56. package/src/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.ts +6 -6
  57. package/src/_modules/discord-assistant/_services/dias-chunk.data-service.ts +9 -9
  58. package/src/_modules/discord-assistant/_services/dias-io.control-service.ts +2 -2
@@ -1,61 +1,53 @@
1
1
  import { DyFM_AI_Message } from '@futdevpro/fsm-dynamo/ai';
2
2
  import { DyFM_AI_CallSettings } from '@futdevpro/fsm-dynamo/ai';
3
- export interface DyFM_AI_Base_Input {
3
+ export interface DyFM_AI_Base_Input<T_AISettings extends DyFM_AI_CallSettings = DyFM_AI_CallSettings> {
4
4
  issuer: string;
5
- settings?: DyFM_AI_CallSettings;
5
+ settings?: T_AISettings;
6
6
  debugLog?: boolean;
7
- }
8
- export interface DyFM_AI_Question_Input extends DyFM_AI_Base_Input {
9
- question: string;
10
7
  replaceThisInLog?: string;
8
+ getFullResponse?: boolean;
9
+ }
10
+ export interface DyFM_AI_Message_Input<T_AISettings extends DyFM_AI_CallSettings = DyFM_AI_CallSettings> extends DyFM_AI_Base_Input<T_AISettings> {
11
+ message: string;
11
12
  }
12
- export interface DyFM_AI_ListSelect_Input extends DyFM_AI_Question_Input {
13
+ export interface DyFM_AI_ListSelect_Input<T_AISettings extends DyFM_AI_CallSettings = DyFM_AI_CallSettings> extends DyFM_AI_Message_Input<T_AISettings> {
13
14
  selectFrom: string[];
14
15
  }
15
- export interface DyFM_AI_GenericSelect_Input<T> extends DyFM_AI_Question_Input {
16
+ export interface DyFM_AI_GenericSelect_Input<T, T_AISettings extends DyFM_AI_CallSettings = DyFM_AI_CallSettings> extends DyFM_AI_Message_Input<T_AISettings> {
16
17
  selectFrom: T[];
17
18
  }
18
- export interface DyFM_AI_MultiSelect_Input extends DyFM_AI_Question_Input {
19
+ export interface DyFM_AI_MultiSelect_Input<T_AISettings extends DyFM_AI_CallSettings = DyFM_AI_CallSettings> extends DyFM_AI_Message_Input<T_AISettings> {
19
20
  options: string[];
20
21
  }
21
- export interface DyFM_AI_GenericMultiSelect_Input<T> extends DyFM_AI_Question_Input {
22
+ export interface DyFM_AI_GenericMultiSelect_Input<T, T_AISettings extends DyFM_AI_CallSettings = DyFM_AI_CallSettings> extends DyFM_AI_Message_Input<T_AISettings> {
22
23
  options: T[];
23
24
  }
24
- export interface DyFM_AI_JSONKeysDescription_Input extends DyFM_AI_Question_Input {
25
+ export interface DyFM_AI_JSONKeysDescription_Input<T_AISettings extends DyFM_AI_CallSettings = DyFM_AI_CallSettings> extends DyFM_AI_Message_Input<T_AISettings> {
25
26
  keysDescription: string;
26
27
  }
27
- export interface DyFM_AI_JSONExactKeys_Input extends DyFM_AI_Question_Input {
28
+ export interface DyFM_AI_JSONExactKeys_Input<T_AISettings extends DyFM_AI_CallSettings = DyFM_AI_CallSettings> extends DyFM_AI_Message_Input<T_AISettings> {
28
29
  keys: string[];
29
30
  }
30
- export interface DyFM_AI_SimpleMessage_Input extends DyFM_AI_Base_Input {
31
- message: string;
32
- }
33
- export interface DyFM_AI_ConversationBase_Input extends DyFM_AI_Base_Input {
31
+ export interface DyFM_AI_ConversationBase_Input<T_AISettings extends DyFM_AI_CallSettings = DyFM_AI_CallSettings> extends DyFM_AI_Base_Input<T_AISettings> {
32
+ message?: string;
34
33
  conversation: DyFM_AI_Message[];
35
- replaceThisInLog?: string;
36
34
  }
37
- export interface DyFM_AI_ConversationQuestion_Input extends DyFM_AI_ConversationBase_Input {
38
- question: string;
39
- }
40
- export interface DyFM_AI_ConversationSelect_Input extends DyFM_AI_ConversationQuestion_Input {
35
+ export interface DyFM_AI_ConversationSelect_Input<T_AISettings extends DyFM_AI_CallSettings = DyFM_AI_CallSettings> extends DyFM_AI_ConversationBase_Input<T_AISettings> {
41
36
  selectFrom: string[];
42
37
  }
43
- export interface DyFM_AI_ConversationGenericSelect_Input<T> extends DyFM_AI_ConversationQuestion_Input {
38
+ export interface DyFM_AI_ConversationGenericSelect_Input<T, T_AISettings extends DyFM_AI_CallSettings = DyFM_AI_CallSettings> extends DyFM_AI_ConversationBase_Input<T_AISettings> {
44
39
  selectFrom: T[];
45
40
  }
46
- export interface DyFM_AI_ConversationMultiSelect_Input extends DyFM_AI_ConversationQuestion_Input {
41
+ export interface DyFM_AI_ConversationMultiSelect_Input<T_AISettings extends DyFM_AI_CallSettings = DyFM_AI_CallSettings> extends DyFM_AI_ConversationBase_Input<T_AISettings> {
47
42
  options: string[];
48
43
  }
49
- export interface DyFM_AI_ConversationGenericMultiSelect_Input<T> extends DyFM_AI_ConversationQuestion_Input {
44
+ export interface DyFM_AI_ConversationGenericMultiSelect_Input<T, T_AISettings extends DyFM_AI_CallSettings = DyFM_AI_CallSettings> extends DyFM_AI_ConversationBase_Input<T_AISettings> {
50
45
  options: T[];
51
46
  }
52
- export interface DyFM_AI_ConversationJSONKeysDescription_Input extends DyFM_AI_ConversationQuestion_Input {
47
+ export interface DyFM_AI_ConversationJSONKeysDescription_Input<T_AISettings extends DyFM_AI_CallSettings = DyFM_AI_CallSettings> extends DyFM_AI_ConversationBase_Input<T_AISettings> {
53
48
  keysDescription: string;
54
49
  }
55
- export interface DyFM_AI_ConversationJSONExactKeys_Input extends DyFM_AI_ConversationQuestion_Input {
50
+ export interface DyFM_AI_ConversationJSONExactKeys_Input<T_AISettings extends DyFM_AI_CallSettings = DyFM_AI_CallSettings> extends DyFM_AI_ConversationBase_Input<T_AISettings> {
56
51
  keys: string[];
57
52
  }
58
- export interface DyFM_AI_ConversationGetAnswer_Input extends DyFM_AI_ConversationBase_Input {
59
- newMessage?: string;
60
- }
61
53
  //# sourceMappingURL=ai-input-interfaces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ai-input-interfaces.d.ts","sourceRoot":"","sources":["../../../../src/_modules/ai/_models/ai-input-interfaces.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB;IAChE,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,wBAAyB,SAAQ,sBAAsB;IACtE,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,2BAA2B,CAAC,CAAC,CAAE,SAAQ,sBAAsB;IAC5E,UAAU,EAAE,CAAC,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,yBAA0B,SAAQ,sBAAsB;IACvE,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,gCAAgC,CAAC,CAAC,CAAE,SAAQ,sBAAsB;IACjF,OAAO,EAAE,CAAC,EAAE,CAAC;CACd;AAED,MAAM,WAAW,iCAAkC,SAAQ,sBAAsB;IAC/E,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,2BAA4B,SAAQ,sBAAsB;IACzE,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,MAAM,WAAW,2BAA4B,SAAQ,kBAAkB;IACrE,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,8BAA+B,SAAQ,kBAAkB;IACxE,YAAY,EAAE,eAAe,EAAE,C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gCAAgC,CAC/C,YAAY,SAAS,oBAAoB,GAAG,oBAAoB,CAChE,SAAQ,8BAA8B,CAAC,YAAY,CAAC;IACpD,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,uCAAuC,CACtD,CAAC,EACD,YAAY,SAAS,oBAAoB,GAAG,oBAAoB,CAChE,SAAQ,8BAA8B,CAAC,YAAY,CAAC;IACpD,UAAU,EAAE,CAAC,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,qCAAqC,CACpD,YAAY,SAAS,oBAAoB,GAAG,oBAAoB,CAChE,SAAQ,8BAA8B,CAAC,YAAY,CAAC;IACpD,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,4CAA4C,CAC3D,CAAC,EACD,YAAY,SAAS,oBAAoB,GAAG,oBAAoB,CAChE,SAAQ,8BAA8B,CAAC,YAAY,CAAC;IACpD,OAAO,EAAE,CAAC,EAAE,CAAC;CACd;AAED,MAAM,WAAW,6CAA6C,CAC5D,YAAY,SAAS,oBAAoB,GAAG,oBAAoB,CAChE,SAAQ,8BAA8B,CAAC,YAAY,CAAC;IACpD,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,uCAAuC,CACtD,YAAY,SAAS,oBAAoB,GAAG,oBAAoB,CAChE,SAAQ,8BAA8B,CAAC,YAAY,CAAC;IACpD,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB"}
@@ -1,3 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ /* export interface DyFM_AI_ConversationGetAnswer_Input extends DyFM_AI_ConversationBase_Input {
4
+ newMessage?: string;
5
+ } */
3
6
  //# sourceMappingURL=ai-input-interfaces.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ai-input-interfaces.js","sourceRoot":"","sources":["../../../../src/_modules/ai/_models/ai-input-interfaces.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"ai-input-interfaces.js","sourceRoot":"","sources":["../../../../src/_modules/ai/_models/ai-input-interfaces.ts"],"names":[],"mappings":";;AAiHA;;IAEI"}
@@ -3,7 +3,7 @@ import { DyFM_AI_Message } from '@futdevpro/fsm-dynamo/ai';
3
3
  import { ChatCompletion } from 'openai/resources';
4
4
  import { DyNTS_OAI_LLM_ServiceBase } from './oai-llm.service-base';
5
5
  import { DyNTS_AI_LLMChat_ServiceBase } from '../../../_services/ai-llm-chat.service-base';
6
- import { DyFM_AI_ConversationQuestion_Input, DyFM_AI_ConversationSelect_Input, DyFM_AI_ConversationGenericSelect_Input, DyFM_AI_ConversationMultiSelect_Input, DyFM_AI_ConversationGenericMultiSelect_Input, DyFM_AI_ConversationJSONKeysDescription_Input, DyFM_AI_ConversationJSONExactKeys_Input, DyFM_AI_ConversationGetAnswer_Input } from '../../../_models/ai-input-interfaces';
6
+ import { DyFM_AI_ConversationBase_Input, DyFM_AI_ConversationGenericSelect_Input, DyFM_AI_ConversationGenericMultiSelect_Input, DyFM_AI_ConversationJSONKeysDescription_Input, DyFM_AI_ConversationJSONExactKeys_Input } from '../../../_models/ai-input-interfaces';
7
7
  /**
8
8
  * {
9
9
  * organization: 'org-XY',
@@ -12,56 +12,52 @@ import { DyFM_AI_ConversationQuestion_Input, DyFM_AI_ConversationSelect_Input, D
12
12
  * }
13
13
  */
14
14
  export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_ServiceBase implements DyNTS_AI_LLMChat_ServiceBase {
15
- private conversationHistories;
16
15
  /**
17
16
  * Hozzáad egy üzenetet a conversation history-hoz
18
17
  *
19
18
  * Adds a message to conversation history
20
19
  */
21
- addMessageToHistory(message: DyFM_AI_Message, issuer: string): void;
22
20
  /**
23
21
  * Törli a conversation history-t
24
22
  *
25
23
  * Clears conversation history
26
24
  */
27
- clearHistory(issuer: string): void;
28
25
  /**
29
26
  * Visszaadja a conversation history-t
30
27
  *
31
28
  * Gets conversation history
32
29
  */
33
- getHistory(issuer: string): DyFM_AI_Message[];
34
30
  /**
35
31
  * Converts generic AI messages to OpenAI-specific format
36
32
  *
37
33
  * Az generic AI üzeneteket OpenAI-specifikus formátumra alakítja át
38
34
  */
39
- private convertToOAIMessages;
40
35
  /**
41
36
  * Asks the AI to answer a yes/no question
42
37
  *
43
38
  * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.yesNo.request} to ask the question,
44
39
  * and the {@link DyNTS_OAI_LLM_Predefined_Requests.yesNo.upperCaseYes} to check the answer
45
40
  */
46
- yesNoQuestionInConversation(set: DyFM_AI_ConversationQuestion_Input): Promise<boolean>;
41
+ requestYesNoInConversation(set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>): Promise<boolean>;
47
42
  /**
48
43
  * Asks the AI to answer a simple question
49
44
  *
50
45
  * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.simpleQuestion} to ask the question
51
46
  */
52
- simpleQuestionInConversation(set: DyFM_AI_ConversationQuestion_Input): Promise<string>;
53
47
  /**
54
48
  * Asks the AI to answer a percentage question
55
49
  *
56
50
  * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.percentageOnly} to ask the question
57
51
  */
58
- percentageQuestionInConversation(set: DyFM_AI_ConversationQuestion_Input): Promise<number>;
52
+ requestPercentageInConversation(set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>): Promise<number>;
59
53
  /**
60
54
  * Asks the AI to select one of the options from the list
61
55
  *
62
56
  * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.selectRequest} to ask the question
63
57
  */
64
- selectQuestionInConversation(set: DyFM_AI_ConversationSelect_Input): Promise<string>;
58
+ requestSelectInConversation<T>(set: DyFM_AI_ConversationGenericSelect_Input<T, DyFM_OAI_CallSettings>): Promise<T | {
59
+ unparsableResult: string;
60
+ }>;
65
61
  /**
66
62
  * Asks the AI to select one of the options from the list
67
63
  * Similar to {@link askSelectQuestion},
@@ -69,15 +65,11 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
69
65
  *
70
66
  * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.selectRequest} to ask the question
71
67
  */
72
- requestSelectInConversation<T>(set: DyFM_AI_ConversationGenericSelect_Input<T>): Promise<T | {
73
- unparsableResult: string;
74
- }>;
75
68
  /**
76
69
  * Asks the AI to select one or more of the options from the list
77
70
  *
78
71
  * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.multiselect} to ask the question
79
72
  */
80
- multipleSelectQuestionInConversationWithOptions(set: DyFM_AI_ConversationMultiSelect_Input): Promise<string[]>;
81
73
  /**
82
74
  * Asks the AI to select one or more of the options from the list
83
75
  * Similar to {@link askMultipleSelectQuestionWithOptions},
@@ -85,7 +77,7 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
85
77
  *
86
78
  * Uses the {@link DyNTS_OAI_LLM_Predefined_Requests.multiselect} to ask the question
87
79
  */
88
- requestMultiselectInConversation<T>(set: DyFM_AI_ConversationGenericMultiSelect_Input<T>): Promise<T[]>;
80
+ requestMultiselectInConversation<T>(set: DyFM_AI_ConversationGenericMultiSelect_Input<T, DyFM_OAI_CallSettings>): Promise<T[]>;
89
81
  /**
90
82
  * Asks the AI to answer a question that must result a JSON object
91
83
  *
@@ -95,7 +87,7 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
95
87
  *
96
88
  * (uses {@link DyFM_safeParseJSON})
97
89
  */
98
- jsonQuestionInConversation<T = any>(set: DyFM_AI_ConversationQuestion_Input): Promise<T | {
90
+ requestJSONInConversation<T = any>(set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>): Promise<T | {
99
91
  unparsableResult: string;
100
92
  }>;
101
93
  /**
@@ -107,7 +99,6 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
107
99
  *
108
100
  * (uses {@link DyFM_safeParseJSON})
109
101
  */
110
- JSONQuestionInConversationWithKeysDescription(set: DyFM_AI_ConversationJSONKeysDescription_Input): Promise<object>;
111
102
  /**
112
103
  * Asks the AI to answer a question that must result a JSON object with specific key descriptions
113
104
  *
@@ -117,7 +108,7 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
117
108
  *
118
109
  * (uses {@link DyFM_safeParseJSON})
119
110
  */
120
- jsonQuestionWithKeysDescriptionInConversation<T = any>(set: DyFM_AI_ConversationJSONKeysDescription_Input): Promise<T | {
111
+ requestJSONInConversationWithKeysDescription<T = any>(set: DyFM_AI_ConversationJSONKeysDescription_Input): Promise<T | {
121
112
  unparsableResult: string;
122
113
  }>;
123
114
  /**
@@ -129,7 +120,6 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
129
120
  *
130
121
  * (uses {@link DyFM_safeParseJSON})
131
122
  */
132
- JSONQuestionInConversationWithExactKeys(set: DyFM_AI_ConversationJSONExactKeys_Input): Promise<object>;
133
123
  /**
134
124
  * Asks the AI to answer a question that must result a JSON object with specific keys
135
125
  *
@@ -139,7 +129,7 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
139
129
  *
140
130
  * (uses {@link DyFM_safeParseJSON})
141
131
  */
142
- jsonQuestionWithExactKeysInConversation<T = any>(set: DyFM_AI_ConversationJSONExactKeys_Input): Promise<T | {
132
+ requestJSONInConversationWithExactKeys<T = any>(set: DyFM_AI_ConversationJSONExactKeys_Input): Promise<T | {
143
133
  unparsableResult: string;
144
134
  }>;
145
135
  /**
@@ -151,13 +141,12 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
151
141
  *
152
142
  * (uses {@link DyFM_Object.safeParseList})
153
143
  */
154
- listQuestionInConversation(set: DyFM_AI_ConversationQuestion_Input): Promise<string[]>;
144
+ requestListInConversation<T = any>(set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>): Promise<T[]>;
155
145
  /**
156
146
  * Asks the AI to answer a question
157
147
  *
158
148
  * Uses the {@link resolveSimpleUserMessage}
159
149
  */
160
- getQuestionAnswerInConversation(set: DyFM_AI_ConversationQuestion_Input): Promise<string>;
161
150
  /**
162
151
  * Asks the AI to answer a question using the whole conversation
163
152
  * (If you want to use only the conversation, without adding a new message,
@@ -165,46 +154,13 @@ export declare class DyNTS_OAI_LLMChat_ServiceBase extends DyNTS_OAI_LLM_Service
165
154
  *
166
155
  * Uses the {@link resolveConversation}
167
156
  */
168
- getAnswerInConversation(set: DyFM_AI_ConversationGetAnswer_Input): Promise<string>;
169
- resolveConversationMessage(set: {
170
- conversation: DyFM_AI_Message[];
171
- issuer: string;
172
- settings?: DyFM_OAI_CallSettings;
173
- getFullResponse?: boolean;
174
- debugLog?: boolean;
175
- /** this is used to readably replace too long contents to eg '...' in logs */
176
- replaceThisInLog?: string;
177
- }): Promise<string>;
157
+ requestSimpleMessageInConversation(set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>): Promise<string>;
178
158
  /**
179
159
  * Resolves a conversation
180
160
  *
181
161
  * Uses the {@link getMessageCreateInput}
182
162
  */
183
- resolveConversation(set: {
184
- conversation: DyFM_AI_Message[];
185
- issuer: string;
186
- settings?: DyFM_OAI_CallSettings;
187
- getFullResponse?: boolean;
188
- debugLog?: boolean;
189
- /** this is used to readably replace too long contents to eg '...' in logs */
190
- replaceThisInLog?: string;
191
- }): Promise<string | ChatCompletion>;
192
- protected shortenConversation(set: {
193
- conversation: DyFM_AI_Message[];
194
- issuer: string;
195
- debugLog?: boolean;
196
- }): DyFM_AI_Message[];
197
- protected logConversation(set: {
198
- conversation: DyFM_AI_Message[];
199
- debugLog?: boolean;
200
- /** this is used to readably replace too long contents to eg '...' in logs */
201
- replaceThisInLog?: string;
202
- }): void;
203
- /**
204
- * Kérdez egy kérdést és JSON választ vár exact keys-szel
205
- *
206
- * Asks a question and expects JSON response with exact keys
207
- */
208
- requestJSONInConversationWithExactKeys<T>(set: DyFM_AI_ConversationJSONExactKeys_Input): Promise<T>;
163
+ resolveConversation(set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>): Promise<string | ChatCompletion>;
164
+ protected shortenConversation(set: DyFM_AI_ConversationBase_Input<DyFM_OAI_CallSettings>): DyFM_AI_Message[];
209
165
  }
210
166
  //# sourceMappingURL=oai-llm-chat.service-base.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"oai-llm-chat.service-base.d.ts","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqC,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAE5G,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAG3D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EACL,kCAAkC,EAClC,gCAAgC,EAChC,uCAAuC,EACvC,qCAAqC,EACrC,4CAA4C,EAC5C,6CAA6C,EAC7C,uCAAuC,EACvC,mCAAmC,EACpC,MAAM,sCAAsC,CAAC;AAG9C;;;;;;GAMG;AAIH,qBAAa,6BAA8B,SAAQ,yBAA0B,YAAW,4BAA4B;IAGlH,OAAO,CAAC,qBAAqB,CAA6C;IAE1E;;;;OAIG;IACH,mBAAmB,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAOnE;;;;OAIG;IACH,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAIlC;;;;OAIG;IACH,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,EAAE;IAI7C;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IAO5B;;;;;OAKG;IACG,2BAA2B,CAAC,GAAG,EAAE,kCAAkC,GAAG,OAAO,CAAC,OAAO,C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E,CAAC;QAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,6EAA6E;QAC7E,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B;IAaH;;;;OAIG;IACG,sCAAsC,CAAC,CAAC,EAC5C,GAAG,EAAE,uCAAuC,GAC3C,OAAO,CAAC,CAAC,CAAC;CAad"}
1
+ {"version":3,"file":"oai-llm-chat.service-base.d.ts","sourceRoot":"","sources":["../../../../../../src/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAqC,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAE5G,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAG3D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EACL,8BAA8B,EAE9B,uCAAuC,EAEvC,4CAA4C,EAC5C,6CAA6C,EAC7C,uCAAuC,EACxC,MAAM,sCAAsC,CAAC;AAG9C;;;;;;GAMG;AAIH,qBAAa,6BAA8B,SAAQ,yBAA0B,YAAW,4BAA4B;IAKlH;;;;OAIG;IAQH;;;;OAIG;IAKH;;;;OAIG;IAKH;;;;OAIG;IAKH;;;;;OAKG;IACG,0BAA0B,CAAC,GAAG,EAAE,8BAA8B,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAW9G;;;;OAIG;IAUH;;;;OAIG;IACG,+BAA+B,CACnC,GAAG,EAAE,8BAA8B,CAAC,qBAAqB,CAAC,GACzD,OAAO,CAAC,MAAM,CAAC;IAYlB;;;;OAIG;IACG,2BAA2B,CAAC,CAAC,EACjC,GAAG,EAAE,uCAAuC,CAAC,CAAC,EAAE,qBAAqB,CAAC,GACrE,OAAO,CAAC,CAAC,GAAG;QAAE,gBAAgB,EAAE,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