mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-24 05:07:06 +08:00
feat: get prompt model names (#13607)
fix AI-419 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - New Features - New API to fetch available models for a prompt, returning default, optional, and pro models with human‑readable names. - Added temperature and topP settings to prompt configuration for finer control. - Refactor - When no model is chosen, the default model is used instead of auto-picking a pro model. - Model metadata across providers now includes readable names, improving listings and selection UX. - Tests - Updated test snapshots and descriptions to reflect the new default-model behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -467,9 +467,9 @@ Generated by [AVA](https://avajs.dev).
|
|||||||
|
|
||||||
'gemini-2.5-flash'
|
'gemini-2.5-flash'
|
||||||
|
|
||||||
> should pick first pro model when no requested model during active
|
> should pick default model when no requested model during active
|
||||||
|
|
||||||
'gemini-2.5-pro'
|
'gemini-2.5-flash'
|
||||||
|
|
||||||
> should honor requested pro model during active
|
> should honor requested pro model during active
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
@@ -2129,13 +2129,13 @@ test('should resolve model correctly based on subscription status and prompt con
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// payment enabled + active: without requested -> first pro; requested pro should be honored
|
// payment enabled + active: without requested -> default model; requested pro should be honored
|
||||||
{
|
{
|
||||||
mockStatus(SubscriptionStatus.Active);
|
mockStatus(SubscriptionStatus.Active);
|
||||||
const model6 = await s.resolveModel(true);
|
const model6 = await s.resolveModel(true);
|
||||||
t.snapshot(
|
t.snapshot(
|
||||||
model6,
|
model6,
|
||||||
'should pick first pro model when no requested model during active'
|
'should pick default model when no requested model during active'
|
||||||
);
|
);
|
||||||
|
|
||||||
const model7 = await s.resolveModel(true, 'claude-sonnet-4@20250514');
|
const model7 = await s.resolveModel(true, 'claude-sonnet-4@20250514');
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ export class AnthropicOfficialProvider extends AnthropicProvider<AnthropicOffici
|
|||||||
|
|
||||||
override readonly models = [
|
override readonly models = [
|
||||||
{
|
{
|
||||||
|
name: 'Claude Opus 4',
|
||||||
id: 'claude-opus-4-20250514',
|
id: 'claude-opus-4-20250514',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
@@ -30,6 +31,7 @@ export class AnthropicOfficialProvider extends AnthropicProvider<AnthropicOffici
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
name: 'Claude Sonnet 4',
|
||||||
id: 'claude-sonnet-4-20250514',
|
id: 'claude-sonnet-4-20250514',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
@@ -39,6 +41,7 @@ export class AnthropicOfficialProvider extends AnthropicProvider<AnthropicOffici
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
name: 'Claude 3.7 Sonnet',
|
||||||
id: 'claude-3-7-sonnet-20250219',
|
id: 'claude-3-7-sonnet-20250219',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
@@ -48,6 +51,7 @@ export class AnthropicOfficialProvider extends AnthropicProvider<AnthropicOffici
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
name: 'Claude 3.5 Sonnet',
|
||||||
id: 'claude-3-5-sonnet-20241022',
|
id: 'claude-3-5-sonnet-20241022',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export class AnthropicVertexProvider extends AnthropicProvider<AnthropicVertexCo
|
|||||||
|
|
||||||
override readonly models = [
|
override readonly models = [
|
||||||
{
|
{
|
||||||
|
name: 'Claude Opus 4',
|
||||||
id: 'claude-opus-4@20250514',
|
id: 'claude-opus-4@20250514',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
@@ -24,6 +25,7 @@ export class AnthropicVertexProvider extends AnthropicProvider<AnthropicVertexCo
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
name: 'Claude Sonnet 4',
|
||||||
id: 'claude-sonnet-4@20250514',
|
id: 'claude-sonnet-4@20250514',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
@@ -33,6 +35,7 @@ export class AnthropicVertexProvider extends AnthropicProvider<AnthropicVertexCo
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
name: 'Claude 3.7 Sonnet',
|
||||||
id: 'claude-3-7-sonnet@20250219',
|
id: 'claude-3-7-sonnet@20250219',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
@@ -42,6 +45,7 @@ export class AnthropicVertexProvider extends AnthropicProvider<AnthropicVertexCo
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
name: 'Claude 3.5 Sonnet',
|
||||||
id: 'claude-3-5-sonnet-v2@20241022',
|
id: 'claude-3-5-sonnet-v2@20241022',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ export class OpenAIProvider extends CopilotProvider<OpenAIConfig> {
|
|||||||
readonly models = [
|
readonly models = [
|
||||||
// Text to Text models
|
// Text to Text models
|
||||||
{
|
{
|
||||||
|
name: 'GPT 4o',
|
||||||
id: 'gpt-4o',
|
id: 'gpt-4o',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
@@ -101,6 +102,7 @@ export class OpenAIProvider extends CopilotProvider<OpenAIConfig> {
|
|||||||
},
|
},
|
||||||
// FIXME(@darkskygit): deprecated
|
// FIXME(@darkskygit): deprecated
|
||||||
{
|
{
|
||||||
|
name: 'GPT 4o 2024-08-06',
|
||||||
id: 'gpt-4o-2024-08-06',
|
id: 'gpt-4o-2024-08-06',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
@@ -110,6 +112,7 @@ export class OpenAIProvider extends CopilotProvider<OpenAIConfig> {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
name: 'GPT 4o Mini',
|
||||||
id: 'gpt-4o-mini',
|
id: 'gpt-4o-mini',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
@@ -120,6 +123,7 @@ export class OpenAIProvider extends CopilotProvider<OpenAIConfig> {
|
|||||||
},
|
},
|
||||||
// FIXME(@darkskygit): deprecated
|
// FIXME(@darkskygit): deprecated
|
||||||
{
|
{
|
||||||
|
name: 'GPT 4o Mini 2024-07-18',
|
||||||
id: 'gpt-4o-mini-2024-07-18',
|
id: 'gpt-4o-mini-2024-07-18',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
@@ -129,6 +133,7 @@ export class OpenAIProvider extends CopilotProvider<OpenAIConfig> {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
name: 'GPT 4.1',
|
||||||
id: 'gpt-4.1',
|
id: 'gpt-4.1',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
@@ -143,6 +148,7 @@ export class OpenAIProvider extends CopilotProvider<OpenAIConfig> {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
name: 'GPT 4.1 2025-04-14',
|
||||||
id: 'gpt-4.1-2025-04-14',
|
id: 'gpt-4.1-2025-04-14',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
@@ -156,6 +162,7 @@ export class OpenAIProvider extends CopilotProvider<OpenAIConfig> {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
name: 'GPT 4.1 Mini',
|
||||||
id: 'gpt-4.1-mini',
|
id: 'gpt-4.1-mini',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
@@ -169,6 +176,7 @@ export class OpenAIProvider extends CopilotProvider<OpenAIConfig> {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
name: 'GPT 4.1 Nano',
|
||||||
id: 'gpt-4.1-nano',
|
id: 'gpt-4.1-nano',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
@@ -182,6 +190,7 @@ export class OpenAIProvider extends CopilotProvider<OpenAIConfig> {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
name: 'GPT 5',
|
||||||
id: 'gpt-5',
|
id: 'gpt-5',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
@@ -195,6 +204,7 @@ export class OpenAIProvider extends CopilotProvider<OpenAIConfig> {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
name: 'GPT 5 2025-08-07',
|
||||||
id: 'gpt-5-2025-08-07',
|
id: 'gpt-5-2025-08-07',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
@@ -208,6 +218,7 @@ export class OpenAIProvider extends CopilotProvider<OpenAIConfig> {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
name: 'GPT 5 Mini',
|
||||||
id: 'gpt-5-mini',
|
id: 'gpt-5-mini',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
@@ -221,6 +232,7 @@ export class OpenAIProvider extends CopilotProvider<OpenAIConfig> {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
name: 'GPT 5 Nano',
|
||||||
id: 'gpt-5-nano',
|
id: 'gpt-5-nano',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
@@ -234,6 +246,7 @@ export class OpenAIProvider extends CopilotProvider<OpenAIConfig> {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
name: 'GPT O1',
|
||||||
id: 'o1',
|
id: 'o1',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
@@ -243,6 +256,7 @@ export class OpenAIProvider extends CopilotProvider<OpenAIConfig> {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
name: 'GPT O3',
|
||||||
id: 'o3',
|
id: 'o3',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
@@ -252,6 +266,7 @@ export class OpenAIProvider extends CopilotProvider<OpenAIConfig> {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
name: 'GPT O4 Mini',
|
||||||
id: 'o4-mini',
|
id: 'o4-mini',
|
||||||
capabilities: [
|
capabilities: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -362,6 +362,27 @@ class CopilotPromptType {
|
|||||||
messages!: CopilotPromptMessageType[];
|
messages!: CopilotPromptMessageType[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ObjectType()
|
||||||
|
class CopilotModelType {
|
||||||
|
@Field(() => String)
|
||||||
|
id!: string;
|
||||||
|
|
||||||
|
@Field(() => String)
|
||||||
|
name!: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ObjectType()
|
||||||
|
export class CopilotModelsType {
|
||||||
|
@Field(() => String)
|
||||||
|
defaultModel!: string;
|
||||||
|
|
||||||
|
@Field(() => [CopilotModelType])
|
||||||
|
optionalModels!: CopilotModelType[];
|
||||||
|
|
||||||
|
@Field(() => [CopilotModelType])
|
||||||
|
proModels!: CopilotModelType[];
|
||||||
|
}
|
||||||
|
|
||||||
@ObjectType()
|
@ObjectType()
|
||||||
export class CopilotSessionType {
|
export class CopilotSessionType {
|
||||||
@Field(() => ID)
|
@Field(() => ID)
|
||||||
@@ -400,9 +421,12 @@ export class CopilotType {
|
|||||||
@Throttle()
|
@Throttle()
|
||||||
@Resolver(() => CopilotType)
|
@Resolver(() => CopilotType)
|
||||||
export class CopilotResolver {
|
export class CopilotResolver {
|
||||||
|
private readonly modelNames = new Map<string, string>();
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private readonly ac: AccessController,
|
private readonly ac: AccessController,
|
||||||
private readonly mutex: RequestMutex,
|
private readonly mutex: RequestMutex,
|
||||||
|
private readonly prompt: PromptService,
|
||||||
private readonly chatSession: ChatSessionService,
|
private readonly chatSession: ChatSessionService,
|
||||||
private readonly storage: CopilotStorage,
|
private readonly storage: CopilotStorage,
|
||||||
private readonly docReader: DocReader,
|
private readonly docReader: DocReader,
|
||||||
@@ -443,6 +467,48 @@ export class CopilotResolver {
|
|||||||
return { userId: user.id, workspaceId, docId: docId || undefined };
|
return { userId: user.id, workspaceId, docId: docId || undefined };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ResolveField(() => CopilotModelsType, {
|
||||||
|
description:
|
||||||
|
'List available models for a prompt, with human-readable names',
|
||||||
|
complexity: 2,
|
||||||
|
})
|
||||||
|
async models(
|
||||||
|
@Args('promptName') promptName: string
|
||||||
|
): Promise<CopilotModelsType> {
|
||||||
|
const prompt = await this.prompt.get(promptName);
|
||||||
|
if (!prompt) {
|
||||||
|
throw new NotFoundException('Prompt not found');
|
||||||
|
}
|
||||||
|
const convertModels = (ids: string[]) => {
|
||||||
|
return ids
|
||||||
|
.map(id => ({ id, name: this.modelNames.get(id) }))
|
||||||
|
.filter(m => !!m.name) as CopilotModelType[];
|
||||||
|
};
|
||||||
|
const proModels = prompt.config?.proModels || [];
|
||||||
|
const missing = new Set(
|
||||||
|
[...prompt.optionalModels, ...proModels].filter(
|
||||||
|
id => !this.modelNames.has(id)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
if (missing.size) {
|
||||||
|
for (const model of missing) {
|
||||||
|
if (this.modelNames.has(model)) continue;
|
||||||
|
const provider = await this.providerFactory.getProviderByModel(model);
|
||||||
|
if (provider?.configured()) {
|
||||||
|
for (const m of provider.models) {
|
||||||
|
if (m.name) this.modelNames.set(m.id, m.name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
defaultModel: prompt.model,
|
||||||
|
optionalModels: convertModels(prompt.optionalModels),
|
||||||
|
proModels: convertModels(proModels),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
@ResolveField(() => CopilotSessionType, {
|
@ResolveField(() => CopilotSessionType, {
|
||||||
description: 'Get the session by id',
|
description: 'Get the session by id',
|
||||||
complexity: 2,
|
complexity: 2,
|
||||||
|
|||||||
@@ -130,15 +130,8 @@ export class ChatSession implements AsyncDisposable {
|
|||||||
paymentEnabled = false;
|
paymentEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (paymentEnabled) {
|
if (paymentEnabled && !isUserAIPro && isPro(requestedModelId)) {
|
||||||
if (isUserAIPro) {
|
return defaultModel;
|
||||||
if (!requestedModelId) {
|
|
||||||
const firstPro = this.proModels[0];
|
|
||||||
return normalize(firstPro);
|
|
||||||
}
|
|
||||||
} else if (isPro(requestedModelId)) {
|
|
||||||
return defaultModel;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return normalize(requestedModelId);
|
return normalize(requestedModelId);
|
||||||
|
|||||||
@@ -226,6 +226,9 @@ type Copilot {
|
|||||||
contexts(contextId: String, sessionId: String): [CopilotContext!]!
|
contexts(contextId: String, sessionId: String): [CopilotContext!]!
|
||||||
histories(docId: String, options: QueryChatHistoriesInput): [CopilotHistories!]! @deprecated(reason: "use `chats` instead")
|
histories(docId: String, options: QueryChatHistoriesInput): [CopilotHistories!]! @deprecated(reason: "use `chats` instead")
|
||||||
|
|
||||||
|
"""List available models for a prompt, with human-readable names"""
|
||||||
|
models(promptName: String!): CopilotModelsType!
|
||||||
|
|
||||||
"""Get the quota of the user in the workspace"""
|
"""Get the quota of the user in the workspace"""
|
||||||
quota: CopilotQuota!
|
quota: CopilotQuota!
|
||||||
|
|
||||||
@@ -360,6 +363,17 @@ type CopilotMessageNotFoundDataType {
|
|||||||
messageId: String!
|
messageId: String!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type CopilotModelType {
|
||||||
|
id: String!
|
||||||
|
name: String!
|
||||||
|
}
|
||||||
|
|
||||||
|
type CopilotModelsType {
|
||||||
|
defaultModel: String!
|
||||||
|
optionalModels: [CopilotModelType!]!
|
||||||
|
proModels: [CopilotModelType!]!
|
||||||
|
}
|
||||||
|
|
||||||
input CopilotPromptConfigInput {
|
input CopilotPromptConfigInput {
|
||||||
frequencyPenalty: Float
|
frequencyPenalty: Float
|
||||||
presencePenalty: Float
|
presencePenalty: Float
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
query getPromptModels($promptName: String!) {
|
||||||
|
currentUser {
|
||||||
|
copilot {
|
||||||
|
models(promptName: $promptName) {
|
||||||
|
defaultModel
|
||||||
|
optionalModels {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
}
|
||||||
|
proModels {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1059,6 +1059,28 @@ export const createCopilotMessageMutation = {
|
|||||||
file: true,
|
file: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getPromptModelsQuery = {
|
||||||
|
id: 'getPromptModelsQuery' as const,
|
||||||
|
op: 'getPromptModels',
|
||||||
|
query: `query getPromptModels($promptName: String!) {
|
||||||
|
currentUser {
|
||||||
|
copilot {
|
||||||
|
models(promptName: $promptName) {
|
||||||
|
defaultModel
|
||||||
|
optionalModels {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
}
|
||||||
|
proModels {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}`,
|
||||||
|
};
|
||||||
|
|
||||||
export const copilotQuotaQuery = {
|
export const copilotQuotaQuery = {
|
||||||
id: 'copilotQuotaQuery' as const,
|
id: 'copilotQuotaQuery' as const,
|
||||||
op: 'copilotQuota',
|
op: 'copilotQuota',
|
||||||
|
|||||||
@@ -263,6 +263,8 @@ export interface Copilot {
|
|||||||
contexts: Array<CopilotContext>;
|
contexts: Array<CopilotContext>;
|
||||||
/** @deprecated use `chats` instead */
|
/** @deprecated use `chats` instead */
|
||||||
histories: Array<CopilotHistories>;
|
histories: Array<CopilotHistories>;
|
||||||
|
/** List available models for a prompt, with human-readable names */
|
||||||
|
models: CopilotModelsType;
|
||||||
/** Get the quota of the user in the workspace */
|
/** Get the quota of the user in the workspace */
|
||||||
quota: CopilotQuota;
|
quota: CopilotQuota;
|
||||||
/** Get the session by id */
|
/** Get the session by id */
|
||||||
@@ -296,6 +298,10 @@ export interface CopilotHistoriesArgs {
|
|||||||
options?: InputMaybe<QueryChatHistoriesInput>;
|
options?: InputMaybe<QueryChatHistoriesInput>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface CopilotModelsArgs {
|
||||||
|
promptName: Scalars['String']['input'];
|
||||||
|
}
|
||||||
|
|
||||||
export interface CopilotSessionArgs {
|
export interface CopilotSessionArgs {
|
||||||
sessionId: Scalars['String']['input'];
|
sessionId: Scalars['String']['input'];
|
||||||
}
|
}
|
||||||
@@ -451,6 +457,19 @@ export interface CopilotMessageNotFoundDataType {
|
|||||||
messageId: Scalars['String']['output'];
|
messageId: Scalars['String']['output'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface CopilotModelType {
|
||||||
|
__typename?: 'CopilotModelType';
|
||||||
|
id: Scalars['String']['output'];
|
||||||
|
name: Scalars['String']['output'];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CopilotModelsType {
|
||||||
|
__typename?: 'CopilotModelsType';
|
||||||
|
defaultModel: Scalars['String']['output'];
|
||||||
|
optionalModels: Array<CopilotModelType>;
|
||||||
|
proModels: Array<CopilotModelType>;
|
||||||
|
}
|
||||||
|
|
||||||
export interface CopilotPromptConfigInput {
|
export interface CopilotPromptConfigInput {
|
||||||
frequencyPenalty?: InputMaybe<Scalars['Float']['input']>;
|
frequencyPenalty?: InputMaybe<Scalars['Float']['input']>;
|
||||||
presencePenalty?: InputMaybe<Scalars['Float']['input']>;
|
presencePenalty?: InputMaybe<Scalars['Float']['input']>;
|
||||||
@@ -4343,6 +4362,34 @@ export type CreateCopilotMessageMutation = {
|
|||||||
createCopilotMessage: string;
|
createCopilotMessage: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type GetPromptModelsQueryVariables = Exact<{
|
||||||
|
promptName: Scalars['String']['input'];
|
||||||
|
}>;
|
||||||
|
|
||||||
|
export type GetPromptModelsQuery = {
|
||||||
|
__typename?: 'Query';
|
||||||
|
currentUser: {
|
||||||
|
__typename?: 'UserType';
|
||||||
|
copilot: {
|
||||||
|
__typename?: 'Copilot';
|
||||||
|
models: {
|
||||||
|
__typename?: 'CopilotModelsType';
|
||||||
|
defaultModel: string;
|
||||||
|
optionalModels: Array<{
|
||||||
|
__typename?: 'CopilotModelType';
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
}>;
|
||||||
|
proModels: Array<{
|
||||||
|
__typename?: 'CopilotModelType';
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
}>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} | null;
|
||||||
|
};
|
||||||
|
|
||||||
export type CopilotQuotaQueryVariables = Exact<{ [key: string]: never }>;
|
export type CopilotQuotaQueryVariables = Exact<{ [key: string]: never }>;
|
||||||
|
|
||||||
export type CopilotQuotaQuery = {
|
export type CopilotQuotaQuery = {
|
||||||
@@ -6380,6 +6427,11 @@ export type Queries =
|
|||||||
variables: GetAudioTranscriptionQueryVariables;
|
variables: GetAudioTranscriptionQueryVariables;
|
||||||
response: GetAudioTranscriptionQuery;
|
response: GetAudioTranscriptionQuery;
|
||||||
}
|
}
|
||||||
|
| {
|
||||||
|
name: 'getPromptModelsQuery';
|
||||||
|
variables: GetPromptModelsQueryVariables;
|
||||||
|
response: GetPromptModelsQuery;
|
||||||
|
}
|
||||||
| {
|
| {
|
||||||
name: 'copilotQuotaQuery';
|
name: 'copilotQuotaQuery';
|
||||||
variables: CopilotQuotaQueryVariables;
|
variables: CopilotQuotaQueryVariables;
|
||||||
|
|||||||
Reference in New Issue
Block a user