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

Set APPMAP_NAVIE_MINI_MODEL as appropriate #60

Open
kgilpin opened this issue Sep 20, 2024 · 1 comment
Open

Set APPMAP_NAVIE_MINI_MODEL as appropriate #60

kgilpin opened this issue Sep 20, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@kgilpin
Copy link
Contributor

kgilpin commented Sep 20, 2024

In some cases, Navie supports APPMAP_NAVIE_MINI_MODEL. Set this env var in solve.yml as appropriate.

@kgilpin kgilpin added the enhancement New feature or request label Sep 20, 2024
Copy link

github-actions bot commented Sep 20, 2024

Title:

Set APPMAP_NAVIE_MINI_MODEL environment variable in solve.yml as appropriate

Problem:

The APPMAP_NAVIE_MINI_MODEL environment variable needs to be set in .github/workflows/solve.yml when appropriate. Currently, this environment variable is not being set, which could result in the Navie mini model not being used when needed.

Analysis:

To solve this problem, we need to identify the scenarios in which APPMAP_NAVIE_MINI_MODEL should be set and make the necessary updates in the solve.yml workflow. This will involve examining the conditions under which different LLM models are used and appropriately configuring the environment variable for the Navie mini model. The existing sections of the solve.yml file that handle environment variables for different LLMs (gpt-4o, claude, etc.) will need to be updated to include the APPMAP_NAVIE_MINI_MODEL when the conditions are met.

Proposed Changes:

  1. File: .github/workflows/solve.yml
    • Section: Locate the section of the workflow where the LLM-specific environment variables are set.
    • Modification: Add a new condition for setting the APPMAP_NAVIE_MINI_MODEL environment variable.

Specific Changes:

  1. Edit the section starting at line 197 in .github/workflows/solve.yml:
    • Modify the logic to include a condition that sets the APPMAP_NAVIE_MINI_MODEL environment variable.
- name: Solve instances
  run: |
    pip install virtualenv
    virtualenv venv
    . ./venv/bin/activate
    pip install -e .

    export PYTHONPATH=$PYTHONPATH:$(pwd)
    export APPMAP_COMMAND="node $(pwd)/submodules/appmap-js/packages/cli/built/cli.js"

    git config --global init.defaultBranch swe-bench-2
    git config --global user.email "[email protected]"
    git config --global user.name "GitHub Workflow"

    llm="${LLM:-gpt-4o}"
    if [[ $llm == "gpt-4o"* ]]; then
      export APPMAP_NAVIE_MODEL="${llm}"
      export OPENAI_API_KEY="${{ secrets.OPENAI_API_KEY }}"
    elif [[ $llm == "claude"* ]]; then
      export APPMAP_NAVIE_MODEL="${llm}"
      export ANTHROPIC_API_KEY="${{ secrets.ANTHROPIC_API_KEY }}"
    fi
    
    # New condition to set APPMAP_NAVIE_MINI_MODEL as appropriate
    if [[ $llm == "mini-model" ]]; then
      export APPMAP_NAVIE_MINI_MODEL="${llm}"
      # Set additional environment variables if needed for mini model
    fi

By adding this condition, you ensure that the APPMAP_NAVIE_MINI_MODEL environment variable is appropriately set when the selected LLM model matches the criteria for the mini model. This will enable the use of the Navie mini model when required.

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

No branches or pull requests

1 participant