Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Summaries are not using .env SUMMARY_MODEL #104

Closed
fjrdomingues opened this issue Apr 19, 2023 · 1 comment
Closed

Summaries are not using .env SUMMARY_MODEL #104

fjrdomingues opened this issue Apr 19, 2023 · 1 comment

Comments

@fjrdomingues
Copy link
Owner

Problem
When autopilot generates new summaries for files, it's not using the model specified in the .env file with the variable SUMMARY_MODEL. Instead, it seems that it's using the CHEAP_MODEL variable.

Desired Outcome
The agent that processes summaries should use the model specified in the SUMMARY_MODEL environment variable

@fjrdomingues fjrdomingues added autopilot Sends this issue to be solved by autopilot and removed autopilot Sends this issue to be solved by autopilot labels Apr 19, 2023
@codeautopilot
Copy link

codeautopilot bot commented Apr 19, 2023

🤖 To solve this task, you need to implement the following:

File: modules/summaries.js
In order to implement the task, you need to change the generateAndWriteFileSummary function in the modules/summaries.js file to use the SUMMARY_MODEL variable from the .env file instead of the CHEAP_MODEL variable.

First, you need to import the SUMMARY_MODEL variable from the .env file at the beginning of the modules/summaries.js file:

const SUMMARY_MODEL = process.env.SUMMARY_MODEL;

Then, update the generateAndWriteFileSummary function to use the SUMMARY_MODEL variable when calling the fileSummary function:

async function generateAndWriteFileSummary(codeBaseDirectory, filePathRelative, fileContent, model) {
  const fileSummary = require('../agents/indexer');

  // ...

  try {
    const summary = await fileSummary(fileContent, SUMMARY_MODEL);

    // ...
  } catch (error) {
    console.error(`Error processing file: ${filePathRelative}`, error);
  }
}

By making these changes, the agent that processes summaries will use the model specified in the SUMMARY_MODEL environment variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant