提示词最大限制
This commit is contained in:
@@ -38,7 +38,7 @@ var (
|
|||||||
ErrInvalidAPIKey = errors.New("invalid api key")
|
ErrInvalidAPIKey = errors.New("invalid api key")
|
||||||
ErrUnknownModel = errors.New("unknown model")
|
ErrUnknownModel = errors.New("unknown model")
|
||||||
ErrUnsupportedParams = errors.New("unsupported or unpriced parameters for this model")
|
ErrUnsupportedParams = errors.New("unsupported or unpriced parameters for this model")
|
||||||
ErrPromptTooLong = errors.New("prompt too long (max 2000 characters)")
|
ErrPromptTooLong = errors.New("prompt too long (max 1500 characters)")
|
||||||
ErrInsufficientFunds = errors.New("insufficient credits")
|
ErrInsufficientFunds = errors.New("insufficient credits")
|
||||||
ErrGenerationPending = errors.New("generation executor not implemented yet")
|
ErrGenerationPending = errors.New("generation executor not implemented yet")
|
||||||
ErrProviderAuth = errors.New("provider token invalid or expired")
|
ErrProviderAuth = errors.New("provider token invalid or expired")
|
||||||
@@ -61,7 +61,7 @@ var (
|
|||||||
|
|
||||||
// maxPromptRunes caps prompt length (counted as characters, so Chinese = 1),
|
// maxPromptRunes caps prompt length (counted as characters, so Chinese = 1),
|
||||||
// matching the 画图台 counter. Enforced for both 画图台 and API-key calls.
|
// matching the 画图台 counter. Enforced for both 画图台 and API-key calls.
|
||||||
const maxPromptRunes = 2000
|
const maxPromptRunes = 1500
|
||||||
|
|
||||||
// maxReferenceImageBytes bounds a single decoded reference image. 8 MB
|
// maxReferenceImageBytes bounds a single decoded reference image. 8 MB
|
||||||
// comfortably covers real photos/screenshots; anything larger is almost
|
// comfortably covers real photos/screenshots; anything larger is almost
|
||||||
|
|||||||
@@ -526,9 +526,9 @@ onUnmounted(() => {
|
|||||||
<div>
|
<div>
|
||||||
<div class="flex items-center justify-between mb-1.5">
|
<div class="flex items-center justify-between mb-1.5">
|
||||||
<label class="block text-xs font-medium text-slate-500">提示词</label>
|
<label class="block text-xs font-medium text-slate-500">提示词</label>
|
||||||
<span class="text-[11px] tabular-nums" :class="prompt.length >= 2000 ? 'text-rose-500' : 'text-slate-400'">{{ prompt.length }}/2000</span>
|
<span class="text-[11px] tabular-nums" :class="prompt.length >= 1500 ? 'text-rose-500' : 'text-slate-400'">{{ prompt.length }}/1500</span>
|
||||||
</div>
|
</div>
|
||||||
<textarea v-model="prompt" rows="4" maxlength="2000" class="field resize-none disabled:opacity-60 disabled:cursor-not-allowed"
|
<textarea v-model="prompt" rows="4" maxlength="1500" class="field resize-none disabled:opacity-60 disabled:cursor-not-allowed"
|
||||||
placeholder="描述想要的画面…如:黄昏时分,金色麦田里奔跑的金毛猎犬,电影感"></textarea>
|
placeholder="描述想要的画面…如:黄昏时分,金色麦田里奔跑的金毛猎犬,电影感"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user