Coder Social home page Coder Social logo

Comments (7)

paul-gauthier avatar paul-gauthier commented on June 12, 2024

There are some docs which might be helpful:

https://aider.chat/docs/llms.html#azure

https://aider.chat/docs/llms.html#model-warnings

https://aider.chat/docs/llms.html#using-a-env-file

from aider.

philliplyle avatar philliplyle commented on June 12, 2024

Thanks Paul. Yes, I've reviewed those items, and did manage to get the alternative deployment name working in conjunction with the environmental variables. It does display a warning but proceeds regardless.

However, it doesnt address why we were previously able to execute against Azure without the environmental variables. If OPENAI_API_TYPE is set to "azure" then why do we still have to set those variables separately?

Just pointing out that it was working without them before.

from aider.

paul-gauthier avatar paul-gauthier commented on June 12, 2024

Aider recently added support for directly connecting to many LLM providers via the litellm package. This change required a shift to environment variables. I would recommend following the new docs about how to connect with Azure, but you're welcome to try and make it work a different way if you prefer.

from aider.

philliplyle avatar philliplyle commented on June 12, 2024

Thanks for confirming the change.

The .ENV method doesn't appear to work for multiple users; does the file require a specific name? I've tried simply ".env" myself as well as other file names, and another person reported the same.

Aider continues to complain that the environmental variables aren't set.

from aider.

paul-gauthier avatar paul-gauthier commented on June 12, 2024

You should create a .env file in the directory where you run aider. I've tested this on my local and it works fine.

I just pushed a change to add a --env-file param to aider, so you can explicitly tell it which file to load. By default it will look in the root of your git repo, in the same dir where you find the .git directory. But you can override and have it load a specific file with --env-file <filename>.

The change is available in the main branch. You can get it by installing the latest version from github:

python -m pip install --upgrade git+https://github.com/paul-gauthier/aider.git

If you have a chance to try it, let me know if it works better for you.

from aider.

philliplyle avatar philliplyle commented on June 12, 2024

I appreciate the feedback. I can only test on a Windows computer at the moment, but it's definitely not picking up my .env. See below. I'll test on the updated version when I can.

05/02/2024 12:56 PM

.
05/01/2024 10:12 AM ..
05/02/2024 08:52 AM 34,417 .aider.chat.history.md
05/02/2024 08:49 AM 24 .aider.conf.yml
05/01/2024 01:30 PM 275 .aider.input.history
05/02/2024 08:49 AM 141 .env
05/01/2024 10:13 AM 108,459 aider.exe

more .env
AZURE_API_KEY=xxxx
AZURE_API_VERSION=2024-02-01
AZURE_API_BASE=xxx.openai.azure.com

aider
Aider v0.30.1
Newer version v0.31.1 is available. To upgrade, run:
C:\installdir\python.exe -m pip
install --upgrade aider-chat
Add .aider* to .gitignore (recommended)? n
**Model azure/test-model: Missing these environment variables:

  • AZURE_API_BASE
  • AZURE_API_VERSION
  • AZURE_API_KEY**

from aider.

paul-gauthier avatar paul-gauthier commented on June 12, 2024

I'm going to close this issue for now, but feel free to add a comment here and I will re-open or file a new issue any time.

from aider.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.