File tree Expand file tree Collapse file tree
services/libs/common_services/src/services Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,6 +158,12 @@ export class LlmService extends LoggerBase {
158158 ) : Promise < ILlmResult < LlmMemberEnrichmentResult > > {
159159 const response = await this . queryLlm ( LlmQueryType . MEMBER_ENRICHMENT , prompt , memberId )
160160
161+ if ( ! response ) {
162+ return {
163+ result : null ,
164+ } as ILlmResult < LlmMemberEnrichmentResult >
165+ }
166+
161167 const result = JSON . parse ( response . answer )
162168
163169 return {
@@ -175,6 +181,12 @@ export class LlmService extends LoggerBase {
175181 memberId ,
176182 )
177183
184+ if ( ! response ) {
185+ return {
186+ result : null ,
187+ } as ILlmResult < { profileIndex : number } >
188+ }
189+
178190 const result = JSON . parse ( response . answer )
179191
180192 return {
@@ -193,6 +205,12 @@ export class LlmService extends LoggerBase {
193205 memberId ,
194206 )
195207
208+ if ( ! response ) {
209+ return {
210+ result : null ,
211+ } as ILlmResult < T >
212+ }
213+
196214 const result = JSON . parse ( response . answer )
197215
198216 return {
@@ -211,6 +229,12 @@ export class LlmService extends LoggerBase {
211229 memberId ,
212230 )
213231
232+ if ( ! response ) {
233+ return {
234+ result : null ,
235+ } as ILlmResult < T >
236+ }
237+
214238 const result = JSON . parse ( response . answer )
215239
216240 return {
You can’t perform that action at this time.
0 commit comments