Spaces:
Running
Running
fix
Browse files- README.md +1 -0
- app/api/ask/route.ts +3 -3
- components/editor/ask-ai/index.tsx +1 -0
README.md
CHANGED
|
@@ -16,6 +16,7 @@ models:
|
|
| 16 |
- moonshotai/Kimi-K2-Instruct-0905
|
| 17 |
- deepseek-ai/DeepSeek-V3.1
|
| 18 |
- deepseek-ai/DeepSeek-V3.1-Terminus
|
|
|
|
| 19 |
---
|
| 20 |
|
| 21 |
# DeepSite 🐳
|
|
|
|
| 16 |
- moonshotai/Kimi-K2-Instruct-0905
|
| 17 |
- deepseek-ai/DeepSeek-V3.1
|
| 18 |
- deepseek-ai/DeepSeek-V3.1-Terminus
|
| 19 |
+
- deepseek-ai/DeepSeek-V3.2-Exp
|
| 20 |
---
|
| 21 |
|
| 22 |
# DeepSite 🐳
|
app/api/ask/route.ts
CHANGED
|
@@ -101,10 +101,10 @@ export async function POST(request: NextRequest) {
|
|
| 101 |
|
| 102 |
const selectedProvider = await getBestProvider(selectedModel.value, provider)
|
| 103 |
|
| 104 |
-
let rewrittenPrompt = prompt;
|
| 105 |
|
| 106 |
if (enhancedSettings.isActive) {
|
| 107 |
-
rewrittenPrompt = await rewritePrompt(
|
| 108 |
}
|
| 109 |
|
| 110 |
try {
|
|
@@ -133,7 +133,7 @@ IMPORTANT: Use the templates as inspiration, but do not copy them exactly.
|
|
| 133 |
Try to create a unique design, based on the templates, but not exactly like them, mostly depending on the user's prompt. These are just examples, do not copy them exactly.
|
| 134 |
` : "");
|
| 135 |
|
| 136 |
-
const userPrompt =
|
| 137 |
|
| 138 |
const estimatedInputTokens = estimateInputTokens(systemPrompt, userPrompt);
|
| 139 |
const dynamicMaxTokens = calculateMaxTokens(selectedProvider, estimatedInputTokens, true);
|
|
|
|
| 101 |
|
| 102 |
const selectedProvider = await getBestProvider(selectedModel.value, provider)
|
| 103 |
|
| 104 |
+
let rewrittenPrompt = redesignMarkdown ? `Here is my current design as a markdown:\n\n${redesignMarkdown}\n\nNow, please create a new design based on this markdown. Use the images in the markdown.` : prompt;
|
| 105 |
|
| 106 |
if (enhancedSettings.isActive) {
|
| 107 |
+
rewrittenPrompt = await rewritePrompt(rewrittenPrompt, enhancedSettings, { token, billTo }, selectedModel.value, selectedProvider.provider);
|
| 108 |
}
|
| 109 |
|
| 110 |
try {
|
|
|
|
| 133 |
Try to create a unique design, based on the templates, but not exactly like them, mostly depending on the user's prompt. These are just examples, do not copy them exactly.
|
| 134 |
` : "");
|
| 135 |
|
| 136 |
+
const userPrompt = rewrittenPrompt;
|
| 137 |
|
| 138 |
const estimatedInputTokens = estimateInputTokens(systemPrompt, userPrompt);
|
| 139 |
const dynamicMaxTokens = calculateMaxTokens(selectedProvider, estimatedInputTokens, true);
|
components/editor/ask-ai/index.tsx
CHANGED
|
@@ -33,6 +33,7 @@ export const AskAi = ({
|
|
| 33 |
}) => {
|
| 34 |
const { user, projects } = useUser();
|
| 35 |
const { isSameHtml, isUploading, pages, isLoadingProject } = useEditor();
|
|
|
|
| 36 |
const {
|
| 37 |
isAiWorking,
|
| 38 |
isThinking,
|
|
|
|
| 33 |
}) => {
|
| 34 |
const { user, projects } = useUser();
|
| 35 |
const { isSameHtml, isUploading, pages, isLoadingProject } = useEditor();
|
| 36 |
+
console.log("isSameHtml", isSameHtml);
|
| 37 |
const {
|
| 38 |
isAiWorking,
|
| 39 |
isThinking,
|