semanticsearch #5
1
.gitignore
vendored
1
.gitignore
vendored
@ -85,4 +85,3 @@ temp/
|
||||
.astro/data-store.json
|
||||
.astro/content.d.ts
|
||||
prompt.md
|
||||
data/embeddings.json
|
||||
|
122331
data/embeddings.json
Normal file
122331
data/embeddings.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -16,7 +16,6 @@
|
||||
"dotenv": "^16.4.5",
|
||||
"jose": "^5.2.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"json-stable-stringify": "^1.3.0",
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"zod": "^3.25.76"
|
||||
},
|
||||
|
@ -54,7 +54,7 @@ const sortedTags = Object.entries(tagFrequency)
|
||||
|
||||
<!-- Semantic Search Toggle - Inline -->
|
||||
<div id="semantic-search-container" class="semantic-search-inline hidden">
|
||||
<label class="semantic-toggle-wrapper" title="Semantische Suche verwendet KI-basierte Bedeutungserkennung statt nur Stichwortvergleich. Findet ähnliche Tools auch wenn andere Begriffe verwendet werden.">
|
||||
<label class="semantic-toggle-wrapper" title="Semantische Suche verwendet Embeddings. Dadurch kann mit natürlicher Sprache/Begriffen gesucht werden, die Ergebnisse richten sich nach der euklidischen Distanz.">
|
||||
<input type="checkbox" id="semantic-search-enabled" />
|
||||
<div class="semantic-checkbox-custom"></div>
|
||||
<span class="semantic-toggle-label">
|
||||
|
@ -1,42 +0,0 @@
|
||||
// src/pages/api/debug-env.ts
|
||||
import type { APIRoute } from 'astro';
|
||||
import { debugEmbeddings } from '../../utils/embeddings.js';
|
||||
|
||||
export const GET: APIRoute = async () => {
|
||||
const embeddingVars = Object.keys(process.env)
|
||||
.filter(key => key.includes('EMBEDDINGS'))
|
||||
.reduce((obj: Record<string, string>, key) => {
|
||||
obj[key] = process.env[key] || 'undefined';
|
||||
return obj;
|
||||
}, {});
|
||||
|
||||
const aiVars = Object.keys(process.env)
|
||||
.filter(key => key.includes('AI_'))
|
||||
.reduce((obj: Record<string, string>, key) => {
|
||||
// Mask sensitive values
|
||||
const value = process.env[key] || 'undefined';
|
||||
obj[key] = key.includes('KEY') || key.includes('SECRET') ?
|
||||
(value.length > 10 ? `${value.slice(0, 6)}...${value.slice(-4)}` : value) :
|
||||
value;
|
||||
return obj;
|
||||
}, {});
|
||||
|
||||
// Force recheck embeddings environment
|
||||
await debugEmbeddings.recheckEnvironment();
|
||||
const embeddingsStatus = debugEmbeddings.getStatus();
|
||||
|
||||
return new Response(JSON.stringify({
|
||||
timestamp: new Date().toISOString(),
|
||||
embeddingVars,
|
||||
allAiVars: aiVars,
|
||||
totalEnvVars: Object.keys(process.env).length,
|
||||
embeddingsStatus,
|
||||
nodeEnv: process.env.NODE_ENV,
|
||||
platform: process.platform
|
||||
}, null, 2), {
|
||||
status: 200,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
};
|
@ -4,7 +4,6 @@ import path from 'path';
|
||||
import { getCompressedToolsDataForAI } from './dataService.js';
|
||||
import 'dotenv/config';
|
||||
import crypto from 'crypto';
|
||||
import stringify from 'json-stable-stringify';
|
||||
|
||||
interface EmbeddingData {
|
||||
id: string;
|
||||
|
Loading…
x
Reference in New Issue
Block a user