diff --git a/app/stores/llm.ts b/app/stores/llm.ts index d92c7c8d..9b5e48d4 100644 --- a/app/stores/llm.ts +++ b/app/stores/llm.ts @@ -83,7 +83,7 @@ class LLM { currentInput = ''; open = false; config = { - maxContextLength: 2000, + maxContextLength: 4096, url: 'https://api.openai.com/v1/chat/completions', apiType: 'openai', model: 'gpt-3.5-turbo', @@ -108,6 +108,7 @@ class LLM { this.setConfig({ ...configMap, ...values, + maxContextLength: values.contextLengthLimit, gqlPath: res.data.gqlPath, }); return this.config; @@ -123,7 +124,7 @@ class LLM { } async getSpaceSchema(space: string) { - const finalPrompt = `The user's current graph space is: ${space} \n`; + const finalPrompt = `The user's current graph space is: ${space} \nschema:\n`; if (this.config.features.includes('spaceSchema')) { await schema.switchSpace(space); await schema.getTagList(); diff --git a/app/utils/ngql.ts b/app/utils/ngql.ts index 0f62d8c2..516f519f 100644 --- a/app/utils/ngql.ts +++ b/app/utils/ngql.ts @@ -1,5 +1,4 @@ import ngqlsheet from './ngqlsheet.json'; -import doc from './doc.json'; const urlTransformerMap = { FETCH: 'FETCHProps', Match: 'MatchOrScanOrQuery', @@ -18,7 +17,7 @@ const ngqlDocs = Object.keys(ngqlsheet).map((key) => ({ url: '/2.quick-start/6.cheatsheet-for-ngql/', content: ngqlsheet[key], })); -export const ngqlDoc = [...ngqlDocs, ...doc] +export const ngqlDoc = [...ngqlDocs] .map((item) => { item.title = item.title .split(' ')