We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe14f97 commit b90c11eCopy full SHA for b90c11e
packages/langbase/src/common/request.ts
@@ -62,6 +62,17 @@ export class Request {
62
const isLllmGenerationEndpoint =
63
GENERATION_ENDPOINTS.includes(endpoint);
64
65
+ // All endpoints should return headers if rawResponse is true
66
+ if (!isLllmGenerationEndpoint && options.body?.rawResponse) {
67
+ const responseData = await response.json();
68
+ return {
69
+ ...responseData,
70
+ rawResponse: {
71
+ headers: Object.fromEntries(response.headers.entries()),
72
+ },
73
+ } as T;
74
+ }
75
+
76
if (isLllmGenerationEndpoint) {
77
const threadId = response.headers.get('lb-thread-id');
78
0 commit comments