llmasaservice-client 0.7.0 → 0.8.0

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # llmasaservice-client
2
2
 
3
+ ## 0.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Adding agent query limit values
8
+
3
9
  ## 0.7.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.d.mts CHANGED
@@ -11,6 +11,8 @@ interface LLMServiceType {
11
11
  customer?: LLMAsAServiceCustomer;
12
12
  url?: string | null;
13
13
  agent?: string | null;
14
+ ragQueryLimit?: number | null;
15
+ ragRankLimit?: number | null;
14
16
  }
15
17
  declare const LLMService: React.Context<LLMServiceType | undefined>;
16
18
  interface UserProviderProps {
@@ -19,6 +21,8 @@ interface UserProviderProps {
19
21
  customer?: LLMAsAServiceCustomer;
20
22
  url?: string | null;
21
23
  agent?: string | null;
24
+ ragQueryLimit?: number | null;
25
+ ragRankLimit?: number | null;
22
26
  }
23
27
  declare const LLMServiceProvider: React.FC<UserProviderProps>;
24
28
 
package/dist/index.d.ts CHANGED
@@ -11,6 +11,8 @@ interface LLMServiceType {
11
11
  customer?: LLMAsAServiceCustomer;
12
12
  url?: string | null;
13
13
  agent?: string | null;
14
+ ragQueryLimit?: number | null;
15
+ ragRankLimit?: number | null;
14
16
  }
15
17
  declare const LLMService: React.Context<LLMServiceType | undefined>;
16
18
  interface UserProviderProps {
@@ -19,6 +21,8 @@ interface UserProviderProps {
19
21
  customer?: LLMAsAServiceCustomer;
20
22
  url?: string | null;
21
23
  agent?: string | null;
24
+ ragQueryLimit?: number | null;
25
+ ragRankLimit?: number | null;
22
26
  }
23
27
  declare const LLMServiceProvider: React.FC<UserProviderProps>;
24
28
 
package/dist/index.js CHANGED
@@ -67,9 +67,11 @@ var LLMServiceProvider = ({
67
67
  project_id,
68
68
  customer,
69
69
  url = "https://chat.llmasaservice.io/",
70
- agent = null
70
+ agent = null,
71
+ ragQueryLimit = null,
72
+ ragRankLimit = null
71
73
  }) => {
72
- return /* @__PURE__ */ import_react.default.createElement(LLMService.Provider, { value: { project_id, customer, url, agent } }, children);
74
+ return /* @__PURE__ */ import_react.default.createElement(LLMService.Provider, { value: { project_id, customer, url, agent, ragQueryLimit, ragRankLimit } }, children);
73
75
  };
74
76
 
75
77
  // src/useLLM.ts
@@ -107,7 +109,9 @@ var useLLM = (options) => {
107
109
  customer: (_b = context == null ? void 0 : context.customer) != null ? _b : {},
108
110
  // if no customer, use the projectId as the customer_id
109
111
  allowCaching,
110
- conversationId: conversation
112
+ conversationId: conversation,
113
+ ragQueryLimit: context == null ? void 0 : context.ragQueryLimit,
114
+ ragRankLimit: context == null ? void 0 : context.ragRankLimit
111
115
  });
112
116
  const options2 = {
113
117
  method: "POST",
package/dist/index.mjs CHANGED
@@ -30,9 +30,11 @@ var LLMServiceProvider = ({
30
30
  project_id,
31
31
  customer,
32
32
  url = "https://chat.llmasaservice.io/",
33
- agent = null
33
+ agent = null,
34
+ ragQueryLimit = null,
35
+ ragRankLimit = null
34
36
  }) => {
35
- return /* @__PURE__ */ React.createElement(LLMService.Provider, { value: { project_id, customer, url, agent } }, children);
37
+ return /* @__PURE__ */ React.createElement(LLMService.Provider, { value: { project_id, customer, url, agent, ragQueryLimit, ragRankLimit } }, children);
36
38
  };
37
39
 
38
40
  // src/useLLM.ts
@@ -70,7 +72,9 @@ var useLLM = (options) => {
70
72
  customer: (_b = context == null ? void 0 : context.customer) != null ? _b : {},
71
73
  // if no customer, use the projectId as the customer_id
72
74
  allowCaching,
73
- conversationId: conversation
75
+ conversationId: conversation,
76
+ ragQueryLimit: context == null ? void 0 : context.ragQueryLimit,
77
+ ragRankLimit: context == null ? void 0 : context.ragRankLimit
74
78
  });
75
79
  const options2 = {
76
80
  method: "POST",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "llmasaservice-client",
3
3
  "license": "MIT",
4
- "version": "0.7.0",
4
+ "version": "0.8.0",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
@@ -12,6 +12,8 @@ export interface LLMServiceType {
12
12
  customer?: LLMAsAServiceCustomer;
13
13
  url?: string | null;
14
14
  agent?: string | null;
15
+ ragQueryLimit?: number | null;
16
+ ragRankLimit?: number | null;
15
17
  }
16
18
 
17
19
  export const LLMService = createContext<LLMServiceType | undefined>(undefined);
@@ -22,6 +24,8 @@ interface UserProviderProps {
22
24
  customer?: LLMAsAServiceCustomer;
23
25
  url?: string | null;
24
26
  agent?: string | null;
27
+ ragQueryLimit?: number | null;
28
+ ragRankLimit?: number | null;
25
29
  }
26
30
 
27
31
  export const LLMServiceProvider: React.FC<UserProviderProps> = ({
@@ -29,10 +33,12 @@ export const LLMServiceProvider: React.FC<UserProviderProps> = ({
29
33
  project_id,
30
34
  customer,
31
35
  url = "https://chat.llmasaservice.io/",
32
- agent = null
36
+ agent = null,
37
+ ragQueryLimit = null,
38
+ ragRankLimit = null,
33
39
  }) => {
34
40
  return (
35
- <LLMService.Provider value={{ project_id, customer, url, agent }}>
41
+ <LLMService.Provider value={{ project_id, customer, url, agent, ragQueryLimit, ragRankLimit }}>
36
42
  {children}
37
43
  </LLMService.Provider>
38
44
  );
package/src/useLLM.ts CHANGED
@@ -80,6 +80,8 @@ export const useLLM = (options?: LLMServiceType): UseLLMReturnType => {
80
80
  customer: context?.customer ?? {}, // if no customer, use the projectId as the customer_id
81
81
  allowCaching: allowCaching,
82
82
  conversationId: conversation,
83
+ ragQueryLimit: context?.ragQueryLimit,
84
+ ragRankLimit: context?.ragRankLimit,
83
85
  });
84
86
 
85
87
  // trying to get cloudfront oac going. posts need to be signed, but when i add this the call fails...