xiongzhu 2 anni fa
parent
commit
d55e33acc5
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  1. 4 1
      src/paper/paper-gen/llm.ts

+ 4 - 1
src/paper/paper-gen/llm.ts

@@ -12,6 +12,9 @@ export function createLLM() {
         openAIApiKey: process.env.OPENAI_API_KEY,
         modelName: 'gpt-3.5-turbo-16k',
         timeout: 1000 * 60 * 5,
+        configuration: {
+            baseURL: 'https://openai.c8c.top/v1'
+        },
         callbackManager: CallbackManager.fromHandlers({
             async handleLLMStart(llm, prompts) {
                 Logger.log(`[LLM Start]LLM: ${JSON.stringify(llm)}`)
@@ -49,7 +52,7 @@ export function createLLM() {
             ['human', '{input}']
         ])
         const memory = new BufferWindowMemory({
-            k: 3,
+            k: 4,
             memoryKey: 'history',
             returnMessages: true
         })