-
Notifications
You must be signed in to change notification settings - Fork 23
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
Single prompt & env overrides #23
base: main
Are you sure you want to change the base?
Conversation
…s not called without 'start' command
Implement --single_prompt mode to use dir-assistant as part of the workflow
@iSevenDays Could you test this version in your workflow? |
@iSevenDays did you get a chance to test this version? |
…tly from the repository with the currently active python bin. Run it with several argument combinations and different modes. Assume the default local LLM and embed models are installed. Assume the OpenAI API key is configured and use the 'gpt-4o-mini' and 'text-embedding-3-small' models for API tests.
…bmitted in interactive mode. Currently it assumes \n will submit, but instead it must use ALT-Enter.
…d to the test output
…dir-assistant in a virtual terminal with the current system python. Alt-Enter is used to submit prompts (as newlines are allowed). Comment the test thoroughly.
@curvedinf I can only test probably on weekend and I'm not really sure, because I'm relocating at the moment, so I can't promise. Overriding Configurations with Environment VariablesI see however some missing items like LiteLLM OpenAI API KEY & Model must be also overridable, I'm not sure this version supports this. I hope you find my feedback useful. |
No sweat, thanks for the update. Let me know if you get around to it. I'd like to release this next week. |
Good point on GLOBAL_IGNORES. I'll see if I can get that in. |
All other config settings should be working in this branch. They are under a new scheme from your branch though. They now live in a namespace so they won't collide with other env vars. Also all config subgroups live in their own sub-namespace. Some examples:
Note on API Keys: LiteLLM by default uses env variables to collect the API keys, and that's the mechanism dir-assistant uses to set them for LiteLLM. Dir-assistant checks if any of the API keys in the config are already set in the environment and does not overwrite them if they exist, so you can always set just |
I have just tested the project and it seems I can't override OPENAI_API_KEY and OPENAI_API_BASE
I have tried and I tried |
Can you try with another litellm version? The error says it is using their gemini adapter and gemini key, not openai. Dir-assistant just passes the model string in and litellm picks the api and key to use. |
Also, is your config file api set to gemini? It could be a bug where it isn't applying the env vars |
@curvedinf no, I don't use gemini. I only use OpenAI-Compatible server (e.g. Ollama or LM Studio). here is a verbose log
|
I found a config that works. The documentation or the code contains bug.
|
LITELLM_CONTEXT_SIZE=9999 is also a only way to override litellm context size, not DIR_ASSISTANT__LITELLM_CONTEXT_SIZE=9999 |
Checks if the filepath either: Ends with the ignore pattern (e.g., resources/swagger/) Contains the ignore pattern as a path component
No description provided.