Skip to content

Commit

Permalink
fix: config error (#772)
Browse files Browse the repository at this point in the history
  • Loading branch information
mizy authored Mar 4, 2024
1 parent 97d2508 commit 9654817
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions app/stores/llm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -108,6 +108,7 @@ class LLM {
this.setConfig({
...configMap,
...values,
maxContextLength: values.contextLengthLimit,
gqlPath: res.data.gqlPath,
});
return this.config;
Expand All @@ -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();
Expand Down
3 changes: 1 addition & 2 deletions app/utils/ngql.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import ngqlsheet from './ngqlsheet.json';
import doc from './doc.json';
const urlTransformerMap = {
FETCH: 'FETCHProps',
Match: 'MatchOrScanOrQuery',
Expand All @@ -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(' ')
Expand Down

0 comments on commit 9654817

Please sign in to comment.