supercompat 2.31.0 → 2.32.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/dist/index.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -11
- package/dist/index.d.ts +6 -11
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -3,8 +3,6 @@ import OpenAI, { AzureOpenAI } from 'openai';
|
|
|
3
3
|
import { Mistral } from '@mistralai/mistralai';
|
|
4
4
|
import Anthropic from '@anthropic-ai/sdk';
|
|
5
5
|
import { MessageWithRun, StorageAdapterArgs } from './types/index.cjs';
|
|
6
|
-
import * as openai_streaming_mjs from 'openai/streaming.mjs';
|
|
7
|
-
import * as openai_resources_beta_assistants_mjs from 'openai/resources/beta/assistants.mjs';
|
|
8
6
|
import * as openai_resources_beta_threads_runs_runs_mjs from 'openai/resources/beta/threads/runs/runs.mjs';
|
|
9
7
|
import * as openai_resources_beta_threads_messages_mjs from 'openai/resources/beta/threads/messages.mjs';
|
|
10
8
|
import * as openai_resources_beta_threads_threads_mjs from 'openai/resources/beta/threads/threads.mjs';
|
|
@@ -162,31 +160,28 @@ declare const prismaStorageAdapter: ({ prisma, }: {
|
|
|
162
160
|
requestHandlers: {
|
|
163
161
|
'^/(?:v1|/?openai)/threads$': {
|
|
164
162
|
post: (options?: openai_core_mjs.RequestOptions<unknown> | undefined) => Promise<Response & {
|
|
165
|
-
json: () => Promise<
|
|
166
|
-
(body?: openai_resources_beta_threads_threads_mjs.ThreadCreateParams | undefined, options?: openai_core_mjs.RequestOptions<unknown> | undefined): openai_core_mjs.APIPromise<openai_resources_beta_threads_threads_mjs.Thread>;
|
|
167
|
-
(options?: openai_core_mjs.RequestOptions<unknown> | undefined): openai_core_mjs.APIPromise<openai_resources_beta_threads_threads_mjs.Thread>;
|
|
168
|
-
}>;
|
|
163
|
+
json: () => Promise<openai_resources_beta_threads_threads_mjs.Threads["create"]>;
|
|
169
164
|
}>;
|
|
170
165
|
};
|
|
171
166
|
"^/(?:v1|/?openai)/threads/([^/]+)/messages$": {
|
|
172
167
|
post: (urlString: string, options: any) => Promise<Response & {
|
|
173
|
-
json: () => Promise<
|
|
168
|
+
json: () => Promise<ReturnType<openai_resources_beta_threads_messages_mjs.Messages["create"]>>;
|
|
174
169
|
}>;
|
|
175
170
|
get: (urlString: string) => Promise<Response & {
|
|
176
|
-
json: () => Promise<
|
|
171
|
+
json: () => Promise<ReturnType<openai_resources_beta_threads_messages_mjs.Messages["create"]>>;
|
|
177
172
|
}>;
|
|
178
173
|
};
|
|
179
174
|
"^/(?:v1|/?openai)/threads/([^/]+)/runs$": {
|
|
180
175
|
get: (urlString: string) => Promise<Response & {
|
|
181
|
-
json: () => Promise<
|
|
176
|
+
json: () => Promise<ReturnType<openai_resources_beta_threads_messages_mjs.Messages["create"]>>;
|
|
182
177
|
}>;
|
|
183
178
|
post: (urlString: string, options: any) => Promise<Response & {
|
|
184
|
-
json: () => Promise<
|
|
179
|
+
json: () => Promise<ReturnType<openai_resources_beta_threads_runs_runs_mjs.Runs["create"]>>;
|
|
185
180
|
}>;
|
|
186
181
|
};
|
|
187
182
|
"^/(?:v1|/?openai)/threads/([^/]+)/runs/([^/]+)$": {
|
|
188
183
|
get: (urlString: string) => Promise<Response & {
|
|
189
|
-
json: () => Promise<
|
|
184
|
+
json: () => Promise<ReturnType<openai_resources_beta_threads_runs_runs_mjs.Runs["retrieve"]>>;
|
|
190
185
|
}>;
|
|
191
186
|
};
|
|
192
187
|
"^/(?:v1|/?openai)/threads/([^/]+)/runs/([^/]+)/steps$": {
|
package/dist/index.d.ts
CHANGED
|
@@ -3,8 +3,6 @@ import OpenAI, { AzureOpenAI } from 'openai';
|
|
|
3
3
|
import { Mistral } from '@mistralai/mistralai';
|
|
4
4
|
import Anthropic from '@anthropic-ai/sdk';
|
|
5
5
|
import { MessageWithRun, StorageAdapterArgs } from './types/index.js';
|
|
6
|
-
import * as openai_streaming_mjs from 'openai/streaming.mjs';
|
|
7
|
-
import * as openai_resources_beta_assistants_mjs from 'openai/resources/beta/assistants.mjs';
|
|
8
6
|
import * as openai_resources_beta_threads_runs_runs_mjs from 'openai/resources/beta/threads/runs/runs.mjs';
|
|
9
7
|
import * as openai_resources_beta_threads_messages_mjs from 'openai/resources/beta/threads/messages.mjs';
|
|
10
8
|
import * as openai_resources_beta_threads_threads_mjs from 'openai/resources/beta/threads/threads.mjs';
|
|
@@ -162,31 +160,28 @@ declare const prismaStorageAdapter: ({ prisma, }: {
|
|
|
162
160
|
requestHandlers: {
|
|
163
161
|
'^/(?:v1|/?openai)/threads$': {
|
|
164
162
|
post: (options?: openai_core_mjs.RequestOptions<unknown> | undefined) => Promise<Response & {
|
|
165
|
-
json: () => Promise<
|
|
166
|
-
(body?: openai_resources_beta_threads_threads_mjs.ThreadCreateParams | undefined, options?: openai_core_mjs.RequestOptions<unknown> | undefined): openai_core_mjs.APIPromise<openai_resources_beta_threads_threads_mjs.Thread>;
|
|
167
|
-
(options?: openai_core_mjs.RequestOptions<unknown> | undefined): openai_core_mjs.APIPromise<openai_resources_beta_threads_threads_mjs.Thread>;
|
|
168
|
-
}>;
|
|
163
|
+
json: () => Promise<openai_resources_beta_threads_threads_mjs.Threads["create"]>;
|
|
169
164
|
}>;
|
|
170
165
|
};
|
|
171
166
|
"^/(?:v1|/?openai)/threads/([^/]+)/messages$": {
|
|
172
167
|
post: (urlString: string, options: any) => Promise<Response & {
|
|
173
|
-
json: () => Promise<
|
|
168
|
+
json: () => Promise<ReturnType<openai_resources_beta_threads_messages_mjs.Messages["create"]>>;
|
|
174
169
|
}>;
|
|
175
170
|
get: (urlString: string) => Promise<Response & {
|
|
176
|
-
json: () => Promise<
|
|
171
|
+
json: () => Promise<ReturnType<openai_resources_beta_threads_messages_mjs.Messages["create"]>>;
|
|
177
172
|
}>;
|
|
178
173
|
};
|
|
179
174
|
"^/(?:v1|/?openai)/threads/([^/]+)/runs$": {
|
|
180
175
|
get: (urlString: string) => Promise<Response & {
|
|
181
|
-
json: () => Promise<
|
|
176
|
+
json: () => Promise<ReturnType<openai_resources_beta_threads_messages_mjs.Messages["create"]>>;
|
|
182
177
|
}>;
|
|
183
178
|
post: (urlString: string, options: any) => Promise<Response & {
|
|
184
|
-
json: () => Promise<
|
|
179
|
+
json: () => Promise<ReturnType<openai_resources_beta_threads_runs_runs_mjs.Runs["create"]>>;
|
|
185
180
|
}>;
|
|
186
181
|
};
|
|
187
182
|
"^/(?:v1|/?openai)/threads/([^/]+)/runs/([^/]+)$": {
|
|
188
183
|
get: (urlString: string) => Promise<Response & {
|
|
189
|
-
json: () => Promise<
|
|
184
|
+
json: () => Promise<ReturnType<openai_resources_beta_threads_runs_runs_mjs.Runs["retrieve"]>>;
|
|
190
185
|
}>;
|
|
191
186
|
};
|
|
192
187
|
"^/(?:v1|/?openai)/threads/([^/]+)/runs/([^/]+)/steps$": {
|
package/dist/index.js
CHANGED
|
@@ -3802,14 +3802,14 @@ var post11 = function(param) {
|
|
|
3802
3802
|
var prisma = param.prisma;
|
|
3803
3803
|
return /*#__PURE__*/ function() {
|
|
3804
3804
|
var _ref = _async_to_generator(function(urlString, options) {
|
|
3805
|
-
var url, _url_pathname_match, threadId, body, role, content, message;
|
|
3805
|
+
var url, _url_pathname_match, threadId, body, role, content, metadata, message;
|
|
3806
3806
|
return _ts_generator(this, function(_state) {
|
|
3807
3807
|
switch(_state.label){
|
|
3808
3808
|
case 0:
|
|
3809
3809
|
url = new URL(urlString);
|
|
3810
3810
|
_url_pathname_match = _sliced_to_array(url.pathname.match(new RegExp(messagesRegexp)), 2), threadId = _url_pathname_match[1];
|
|
3811
3811
|
body = JSON.parse(options.body);
|
|
3812
|
-
role = body.role, content = body.content;
|
|
3812
|
+
role = body.role, content = body.content, metadata = body.metadata;
|
|
3813
3813
|
return [
|
|
3814
3814
|
4,
|
|
3815
3815
|
prisma.message.create({
|
|
@@ -3818,7 +3818,8 @@ var post11 = function(param) {
|
|
|
3818
3818
|
content: messageContentBlocks({
|
|
3819
3819
|
content: content
|
|
3820
3820
|
}),
|
|
3821
|
-
role: role === "user" ? "USER" : "ASSISTANT"
|
|
3821
|
+
role: role === "user" ? "USER" : "ASSISTANT",
|
|
3822
|
+
metadata: metadata || {}
|
|
3822
3823
|
}
|
|
3823
3824
|
})
|
|
3824
3825
|
];
|