New homekit device lumi.gateway.aqhm01 not working properly

Home Assistant release with the issue:
0.82
Last working Home Assistant release (if known):
None
Operating environment (Hass.io/Docker/Windows/etc.):
hass.io
Component/platform:
light/homekit_controller.py
There appeared new hub from Xiaomi, branded as Aqara hub.
This hub is (yet) not compatible to be added as a xiaomi_aqara component (cant get dev mode).
But it is out of the box discovered as a homekit device. Home assistant detects it as "light".
But it does not work properly because it reports his 'characteristics' in lowercase hex.
And homekit module is not able to map them this way. Here is a simple one line fix
that makes this gateway (at least) work as light device:
line 44: 'ctype = characteristic['type'].upper()'

Actually i went a bit deeper, and merger a PR with fix here:
https://github.com/jlusiardi/homekit_python
Anyway will close this issue as it was related to that library and not HA at all.


Access the fetch object in a vscode extension

My extension needs to access window.fetch. Would this be possible?

No.
Your extension runs in Node.js context where there is no fetch.

No.
Your extension runs in Node.js context where there is no fetch.
EDIT: neither window

Alright. I managed to get a solution with node fetch. Thanks


refactor mergeMaps to avoid effect params

Please provide a description of this PR:
This way of writing is easy to be misunderstood as generating a new map from two maps and easy to overlook that this method will change the input parameters
func mergeMaps(base, override map[string]string) map[string]string{}

Using this kind of no return can make it clear that it will change the input parameters
func mergeMaps(base, override map[string]string)

Or return a new map as in this pr, without changing the input parameters

@rokkiter: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

release-notes_istio
8b03c0d731f360e06c92e5551746974343e1caab
link
true
/test release-notes

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest

@rokkiter: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

unit-tests-arm64_istio
0abf815190842ddec1438ff9ee50b4f8ab8a95c2
link
true
/test unit-tests-arm64

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@rokkiter: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

unit-tests-arm64_istio
0abf815190842ddec1438ff9ee50b4f8ab8a95c2
link
true
/test unit-tests-arm64

unit-tests_istio
0abf815190842ddec1438ff9ee50b4f8ab8a95c2
link
true
/test unit-tests

integ-basic-arm64_istio
0abf815190842ddec1438ff9ee50b4f8ab8a95c2
link
true
/test integ-basic-arm64

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@rokkiter: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

unit-tests_istio
0abf815190842ddec1438ff9ee50b4f8ab8a95c2
link
true
/test unit-tests

integ-basic-arm64_istio
0abf815190842ddec1438ff9ee50b4f8ab8a95c2
link
true
/test integ-basic-arm64

integ-security-multicluster_istio
811ad4774544434f5273d178cb80669375f2e5e4
link
true
/test integ-security-multicluster

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@rokkiter: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

unit-tests_istio
0abf815190842ddec1438ff9ee50b4f8ab8a95c2
link
true
/test unit-tests

integ-basic-arm64_istio
0abf815190842ddec1438ff9ee50b4f8ab8a95c2
link
true
/test integ-basic-arm64

integ-security-multicluster_istio
811ad4774544434f5273d178cb80669375f2e5e4
link
true
/test integ-security-multicluster

gencheck_istio
811ad4774544434f5273d178cb80669375f2e5e4
link
true
/test gencheck

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@rokkiter: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

unit-tests_istio
0abf815190842ddec1438ff9ee50b4f8ab8a95c2
link
true
/test unit-tests

integ-basic-arm64_istio
0abf815190842ddec1438ff9ee50b4f8ab8a95c2
link
true
/test integ-basic-arm64

integ-security-multicluster_istio
811ad4774544434f5273d178cb80669375f2e5e4
link
true
/test integ-security-multicluster

gencheck_istio
811ad4774544434f5273d178cb80669375f2e5e4
link
true
/test gencheck

lint_istio
811ad4774544434f5273d178cb80669375f2e5e4
link
true
/test lint

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


ValueError: Only one class present in y_true. ROC AUC score is not defined in that case.

Good afternoon,
When running the example code for Validator I am unable to get the OPLSValidator to fit without throwing the ValueError: Only one class present in y_true. ROC AUC score is not defined in that case.
Not sure if this has something to do with my setup or if others are having this issue as well.
Thanks!
Scott

Running the sample code exactly as provided should work. Perhaps something is wrong with how the test dataset is being loaded?
The test data for the OPLSValidator example is provided by sklearn.datasets.load_wine. There might be an issue there, or in the filtering by the target variable:
df = df[df.classification.isin((0, 1))

@scrawfordeng I am closing this issue due to a lack of response. Please let me know if you still have this issue after following my suggested solution so I can reopen the issue.
Thanks,
Daniel Foose


Error at downloading account name

Error downloading account name.
DebugInfo log
[18-09-2019 17:19] Failed to build HTTP request and get response for: method=GET, url='https://www.pathofexile.com/login', allowAutoRedirects=, requestData='': The remote server returned an error: (503) Server Unavailable.
[18-09-2019 17:19] Failed to build HTTP request and get response for: method=GET, url='https://www.pathofexile.com/character-window/get-account-name?realm=pc', allowAutoRedirects=, requestData='': The remote server returned an error: (401) Unauthorized.
[18-09-2019 17:19] Error downloading account name, exception details: System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at POEApi.Transport.HttpTransport.BuildHttpRequestAndGetResponse(HttpMethod method, String url, Nullable1 allowAutoRedirects, String requestData)    at POEApi.Transport.HttpTransport.PerformHttpRequest(HttpMethod method, String url, Nullable1 allowAutoRedirects, String requestData)
at POEApi.Transport.HttpTransport.GetAccountName(String realm)
at POEApi.Model.POEModel.GetAccountName(String realm)
[18-09-2019 17:19] System.Exception: Error downloading account name, details logged to DebugInfo.log. Please open a ticket at https://github.com/Stickymaddness/Procurement/issues and include your DebugInfo.log
at POEApi.Model.POEModel.GetAccountName(String realm)
at Procurement.ViewModel.LoginWindowViewModel.<>c__DisplayClass23_0.b__0()
at System.Threading.Tasks.Task.Execute()
[18-09-2019 17:19] Failed to build HTTP request and get response for: method=GET, url='https://www.pathofexile.com/login', allowAutoRedirects=, requestData='': The remote server returned an error: (503) Server Unavailable.
[18-09-2019 17:20] Failed to build HTTP request and get response for: method=GET, url='https://www.pathofexile.com/character-window/get-account-name?realm=pc', allowAutoRedirects=, requestData='': The remote server returned an error: (401) Unauthorized.
[18-09-2019 17:20] Error downloading account name, exception details: System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at POEApi.Transport.HttpTransport.BuildHttpRequestAndGetResponse(HttpMethod method, String url, Nullable1 allowAutoRedirects, String requestData)    at POEApi.Transport.HttpTransport.PerformHttpRequest(HttpMethod method, String url, Nullable1 allowAutoRedirects, String requestData)
at POEApi.Transport.HttpTransport.GetAccountName(String realm)
at POEApi.Model.POEModel.GetAccountName(String realm)
[18-09-2019 17:20] System.Exception: Error downloading account name, details logged to DebugInfo.log. Please open a ticket at https://github.com/Stickymaddness/Procurement/issues and include your DebugInfo.log
at POEApi.Model.POEModel.GetAccountName(String realm)
at Procurement.ViewModel.LoginWindowViewModel.<>c__DisplayClass23_0.b__0()
at System.Threading.Tasks.Task.Execute()
[18-09-2019 17:20] Failed to build HTTP request and get response for: method=GET, url='https://www.pathofexile.com/login', allowAutoRedirects=, requestData='': The remote server returned an error: (503) Server Unavailable.
[18-09-2019 17:20] Failed to build HTTP request and get response for: method=GET, url='https://www.pathofexile.com/character-window/get-account-name?realm=pc', allowAutoRedirects=, requestData='': The remote server returned an error: (401) Unauthorized.
[18-09-2019 17:20] Error downloading account name, exception details: System.Net.WebException: The remote server returned an error: (401) Unauthorized.
at System.Net.HttpWebRequest.GetResponse()
at POEApi.Transport.HttpTransport.BuildHttpRequestAndGetResponse(HttpMethod method, String url, Nullable1 allowAutoRedirects, String requestData)    at POEApi.Transport.HttpTransport.PerformHttpRequest(HttpMethod method, String url, Nullable1 allowAutoRedirects, String requestData)
at POEApi.Transport.HttpTransport.GetAccountName(String realm)
at POEApi.Model.POEModel.GetAccountName(String realm)
[18-09-2019 17:20] System.Exception: Error downloading account name, details logged to DebugInfo.log. Please open a ticket at https://github.com/Stickymaddness/Procurement/issues and include your DebugInfo.log
at POEApi.Model.POEModel.GetAccountName(String realm)
at Procurement.ViewModel.LoginWindowViewModel.<>c__DisplayClass23_0.b__0()
at System.Threading.Tasks.Task.Execute()

Since you're getting a 401 unauthorized I wonder if you can double check that your poe session ID still matches what is shown at pathofexile.com when looking at application data using dev tools.


Server problems and client side mods? 1.19.4

I'm not too sure how the title could help really, BUT i have an issue, i'm starting up a server using this mod and multiple others, it kept causing the server to shut down, asking the help team of the hosting site, they said it's because it registers as client side only. I thought that was strange, uninstalled it from the modpack, and tried joining with it still in my own mod folder, to which it told me i couldn't join because the server was missing the mod. If there's anything that could be helped so we could add this to our modpack, it'd be wonderfully appreciated.

I was able to duplicate this on my end, I will work on this asap


Changes documentation screenshots for a more recent UI

Small cosmetic change for the docs.
The current screenshots in Flask's docs are 8 years old. These new ones have the same info but with a recent UI (the CSS for the debugger and the browser's UI has changed since).

Thanks!
Just a FYI for future commits; Ideally the first line is shorter than 51 characters, and it should for sure not be so long that even GitHub truncates it. https://chris.beams.io/posts/git-commit/ is quite useful in terms of how to format Git commits.

Sounds good, thanks for the info


Add more tests to validate the current command error handling behaviors

PR Summary
This PR adds 39 tests to validate and track the existing command error handling behaviors.
This PR is a preparation for #15177. The new tests added here will protect regressions that could be introduced to the command error handling by #15177.
Please be noted that those tests are by no means covering every aspect of the error handling behaviors.
I tried to cover most of the subtle behaviors -- some are not well known and may even be a little confusing to some extent. This is because these subtle behaviors may not be well tested, and adding those new tests will help guard me from introducing regression without knowing when working on #15177.
For the more obvious/common behaviors, I hope they are already covered by existing tests.
PR Checklist

[x] PR has a meaningful title

Use the present tense and imperative mood when describing your changes

[x] Summarized changes
[x] Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
[x] This PR is ready to merge and is not Work in Progress.

If the PR is work in progress, please add the prefix WIP: or [ WIP ] to the beginning of the title (the WIP bot will keep its status check at Pending while the prefix is present) and remove the prefix when the PR is ready.

Breaking changes

[x] None

User-facing changes

[x] Not Applicable

Testing - New and feature

[x] Make sure you've added a new test if existing tests do not effectively test the code changed

Tooling

[x] I have considered the user experience from a tooling perspective and don't believe tooling will be impacted.

To combine the tests in Context-s in one (per Context) with TestCases - it would be great readable.

@iSazonov, I already did my best grouping test cases with -TestCases. I believe being more aggressive grouping the remaining It tests will make the test harder to read.


WIP: security requirements of the container-native operators

According to the operator best practice requirements document, we check the recommended security requirements of the container operators:

USER id should not be 0

readOnlyRootFilesystem = true

runAsNonRoot = true

automount service account token = false{}

It draft .
you can see the PR here : https://github.com/test-network-function/cnf-certification-test/pull/1967


#106 Greeting bot Added

🛠 Fixes Issue: #106

👨💻 Changes proposed:

📝 Additional Notes
Discord username

Link to any external resources

📷 Screenshots

✔ Check List (Check all the applicable boxes)

[x] My code follows the code style of this project.
[x] The title of my pull request is a short description of the requested changes.
[x] I am a participant of GSSOC23

@Fenrir-04 please add respective labels also
i will add other bots shortly :)

@Fenrir-04 bro pelease add level tag also in this PR :)

@Fenrir-04 add level in this pr plzz so that it can properly count in the gssoc23

@Fenrir-04 bro please remove these labels as i have added the bots in other repo also
so it will be counted in spam
Happy to contribute , will look for some other issues
just remove the labels thanks :)

@Fenrir-04 add level in this pr plzz so that it can properly count in the gssoc23

@Fenrir-04 please do the needful


Update travisCI configuration file

This PR includes:

Remove support for Python 3.2 and add support for 3.4, 3.5, 3.6. (According to setuptools changelog support for Python 3.2 was dropped.)
Define mongodb as a requirement in travis.yml (all tests were silently failing!)
Improve runtests.py to return a proper exit code (It was returning '0' always!!!)
As a side effect coverage percentage was increased by ~34%

Coverage remained the same at 28.461% when pulling 6baadf93ac0519a56f4e4d5314de71728e1551c8 on update-travis-configuration into 85fdb0a05f625d1bcf7a4441773cdb84e1eea1ce on master.

Coverage increased (+33.9%) to 62.37% when pulling 4b3ef79857627cad943224c75ab1f0ff3ad04fe4 on update-travis-configuration into 85fdb0a05f625d1bcf7a4441773cdb84e1eea1ce on master.

Coverage increased (+34.0%) to 62.458% when pulling 0e9275c6ddd2dc5a2a7c8448f0c109ce3a543d5b on update-travis-configuration into 85fdb0a05f625d1bcf7a4441773cdb84e1eea1ce on master.

Still some failures in TravisCI but a nice clean up.

Coverage increased (+33.9%) to 62.37% when pulling b43e987068e59075ebcb7789ba3cbf7b66859bf8 on update-travis-configuration into 85fdb0a05f625d1bcf7a4441773cdb84e1eea1ce on master.

Please check previous and current build logs. All tests were failing because mongodb wasn't available.

All tests were failing because mongodb wasn't available.

A minor thing, right? :stuck_out_tongue:  (yeah, being sarcastic here)


[FLINK-9684][historyserver] HistoryServer should initialize FileSystem before using it

What is the purpose of the change
Details explained in https://issues.apache.org/jira/browse/FLINK-9684 . This pull request makes HistoryServer initialize FileSystem before using it. That way HistoryServerArchiveFetcher will be able to talk to secure hdfs correctly.
Brief change log

HistoryServer initializes FileSystem before using it

Verifying this change
This change added tests and can be verified as follows:

Manually verified the change by running a historyserver with kerberos-secured hdfs cluster.

Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency):  (no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
The serializers: (no)
The runtime per-record code paths (performance sensitive): (no)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
The S3 file system connector: (no)

Documentation

Does this pull request introduce a new feature? (no)
If yes, how is the feature documented? (not applicable)

Just realized fs.hdfs.hadoopconf is deprecated and we want to use HADOOP_CONF_DIR instead.
https://github.com/apache/flink/blob/master/flink-core/src/main/java/org/apache/flink/configuration/ConfigConstants.java#L652-L658
Not sure why we are doing it. But I will close this PR.


Allow nested paths on Windows

Nested paths on Windows gave the following error:
> ember g style some/nested/path
version: 2.3.0-beta.1
installing style
  create app\some\nested\path\style.scss

ENOENT: no such file or directory, open 'C:\project\app\styles\some\nested\path.scss'
Error: ENOENT: no such file or directory, open 'C:\project\app\styles\some\nested\path.scss'
    at Error (native)
    at Object.fs.openSync (evalmachine.<anonymous>:549:18)
    at Object.fs.writeFileSync (evalmachine.<anonymous>:1161:15)
    at addScssToImportFile (C:\project\node_modules\ember-cli-sass-pods\blueprints\style\index.js:54:14)

    at Class.module.exports.afterInstall (C:\project\node_modules\ember-cli-sass-pods\blueprints\style\index.js:33:7)
    at lib$rsvp$$internal$$tryCatch (C:\project\node_modules\rsvp\dist\rsvp.js:493:16)
    at lib$rsvp$$internal$$invokeCallback (C:\project\node_modules\rsvp\dist\rsvp.js:505:17)
    at lib$rsvp$$internal$$publish (C:\project\node_modules\rsvp\dist\rsvp.js:476:11)
    at lib$rsvp$asap$$flush (C:\project\node_modules\rsvp\dist\rsvp.js:1198:9)
    at doNTCallback0 (node.js:407:9)

This PR fixes that issue by replacing backslashes (\) by forward slashes (/) in the file name.

Thanks!

@justtal do you think you can release a new version so we don't have to use a git
dependency in our package.json anymore?

@dudadev @justtal Any update on a new release?


leading newline makes Text disappear

Bug Description
When a string with a leading newline is passed to the Text widget, the text below that newline does not show up. It appears that this leading newline is not being included in some height computation because if there are multiple lines of text after a single leading newline, only the last line of text gets swallowed.
What did I Expect to Happen?
I would expect that leading newlines get included in the text that is displayed as well as all of the following text.
Minimal Example
use iced::{Element, Sandbox, Settings, Text};

pub fn main() {
    Bug::run(Settings::default())
}

struct Bug;

impl Sandbox for Bug {
    type Message = ();

    fn new() -> Bug {
        Bug
    }

    fn title(&self) -> String {
        String::from("A minimal repro")
    }

    fn update(&mut self, _message: Self::Message) {
    }

    fn view(&mut self) -> Element<Self::Message> {
        Text::new("\nmissing").into()
    }
}

Screenshot

Multi-line Example
use iced::{Element, Sandbox, Settings, Text};

pub fn main() {
    Bug::run(Settings::default())
}

struct Bug;

impl Sandbox for Bug {
    type Message = ();

    fn new() -> Bug {
        Bug
    }

    fn title(&self) -> String {
        String::from("A minimal repro")
    }

    fn update(&mut self, _message: Self::Message) {
    }

    fn view(&mut self) -> Element<Self::Message> {
        Text::new("\nnow it shows up\nthis guy is missing though").into()
    }
}

Screenshot

More details about my system
$ uname -a
Darwin ethanpailesmac 18.7.0 Darwin Kernel Version 18.7.0: Mon Feb 10 21:08:45 PST 2020; root:xnu-4903.278.28~1/RELEASE_X86_64 x86_64

I think I've traced this issue to the glyph_bounds routine from the glyph_brush crate (called here). The docs for that routine say "Invisible glyphs, like spaces, are discarded during layout", so it sounds like this is working as intended upstream which suggests that this won't be fixed upstream.
It seems like there are a couple of routes forward:

Manually detect leading spaces and fix up the return value of glyph_bounds. Probably not idea.
Strip leading and trailing whitespace from input to the Text widget so that the text that gets displayed matches up with the text we have computed the bounds for.

I'm in favor of (2), but I think I've reached the point where I need to maintainer to make the final call on a design question.
I can try to put a patch together for this once you've made a decision (or you can just go ahead and patch it yourself, I bet the fix will be pretty trivial if you decide to go with door number 2).

Thanks for the detailed report and the SSCCEs! This is a really great bug report :D
The current text rendering pipeline is relatively broken (see #33 and https://github.com/hecrj/iced/issues/243#issuecomment-605655876), it has many similar issues, and it  will need a full rewrite/replacement in the near future.
Because of this, I believe it's better to tackle all the issues at once instead of investing time in trying to patch a broken model.


In HTML reports, show app, not NodeDriver

Right now we say, for example:
client: imp.ImpInProcessNodeDriver
server: saas.SaasFediverseNodeDriver

or
server: mastodon.MastodonUbosNodeDriver

This should be a representation of Node (e.g. Mastodon), not NodeDriver (e.g. mastodon.MastodonUbosNodeDriver)
Somewhere in the constellation details it can say what driver was used.

We got some version of that now.


Does not play well with bkad/CamelCaseMotion

Thanks for your work! I tried it out today after seeing it in /r/neovim. My setup uses https://github.com/bkad/CamelCaseMotion and since that appears to redefine what a word is, the hints from precognition don't always align with what actually happens via w and b.
Below is a demonstration of successive use of b on a word.

Not sure if this is something that could or should be addressed, but I figured I'd point it out. 😄

I will close this issue, and we can continue to track in the other linked issue


JSONWebTokenMiddleware always returns Anonymous User - Possible Bug & Fix

Hi Folks,
LOVE this project and its amazing contributions to the Graphene / GraphQL ecosystem in Python. I've been running into a weird bug that I think I finally traced and seems to be in your allow_any method in your JSONWebTokenMiddleware. I keep trying to authenticate with a JWT token and keep getting an error that my user is not authenticated. I had a JWT token and it was valid, so I tried to trace where this was coming from in your JSONWebTokenMiddleware with this modified code:
    def resolve(self, next, root, info, **kwargs):

        print(f"Resolve...")

        context = info.context
        token_argument = get_token_argument(context, **kwargs)

        print("Check 1")
        if jwt_settings.JWT_ALLOW_ARGUMENT and token_argument is None:

            user = self.cached_authentication.parent(info.path)
            print(f"User check 1: {user}")

            if user is not None:
                context.user = user

            elif hasattr(context, "user"):
                if hasattr(context, "session"):
                    context.user = get_user(context)
                    self.cached_authentication.insert(info.path, context.user)
                else:
                    context.user = AnonymousUser()

        print("Check 2")
        if (
            _authenticate(context) or token_argument is not None
        ) and self.authenticate_context(info, **kwargs):

            user = authenticate(request=context, **kwargs)
            print(f"User check 2: {user}")

            if user is not None:
                context.user = user

                if jwt_settings.JWT_ALLOW_ARGUMENT:
                    self.cached_authentication.insert(info.path, user)

        print("Return...")
        print(f"context user: {info.context.user}")

        return next(root, info, **kwargs)

Turns out the user keeps coming back as AnonymousUser:
gk_django       | Resolve...
gk_django       | Check 1
gk_django       | Check 2
gk_django       | Return...
gk_django       | context user: AnonymousUser

I traced the code and found your allow_any method appears to be throwing an unexpected error which is handled by the Middleware as if the User is invalid.
This line in allow_any:
field = info.schema.get_type(operation_name).fields.get(info.field_name)
Results in this error:
"'NoneType' object has no attribute 'fields'"
It looks like, when I send a query for a model called corpus, for example, the operation_name argument resolves to "Query". When I look at info.schema.types, however, Query is not one of the types. The CorpusNode name is in there, however. So, when I change the field = call to look to resolve to get_type('CorpusNode')...
field = info.schema.get_type(info.return_type.graphene_type._meta.node._meta.name).fields.get(info.field_name)
It works (with the same JWT token that said I was unauthorized before)!
It looks like others have run into similar-ish sounding problems (see recent issue #289 where someone notes there is a problem in the Middleware), so possibly this is unexpected behavior? Not sure why more people aren't running into this if it's a bug though. If it helps, here's the current list of graphene-related packages I'm using.
graphene                          2.1.9
django-graphql-jwt                0.3.4
graphene-django                   2.15.0
graphene-django-crud              1.3.2
graphene-django-extras            0.4.9
graphene-django-optimizer         0.9.1
graphene-django-plus              4.0.3
graphene-file-upload              1.3.0
graphene-permissions              1.1.4
graphene-subscriptions            1.0.2
graphql-core                      2.3.2
graphql-relay                     2.0.1

I think there's a little more to this, but I haven't quite been able to figure out what's going on. I forked this repo and made the change to allow_any I suggested above, thinking that would fix the problem. It did not. When I installed from that repo instead of your package, I still kept getting messages that I wasn't authorized.
I did some more digging and it appears under the following conditions I can get everything to work:

I create local copies of your backend, utils and middleware modules, and
I reference my local copies of the backend and middleware in my settings.py

This fixes the issue and no change was needed to allow_any. I got confused when I was trying to bug trace because I had to create local copies to drop in the print statements, and somehow doing that is solving my issue.
At first glance, my backend.py and JSONWebTokenBackend module is identical to the one your library ships with save for the print statements I'm using. I'm having trouble figuring out why the above combination of steps appear to fix things. I'll keep digging here, but wanted to report this in the hopes it's helpful to others in the interim.

Ok, this got even stranger... I've further narrowed down the behavior here:

The above steps (creating local copies of my middleware) and referencing those in settings.py work but only for lists, particularly, in my implementation a DjangoFilterConnectionField. When I tried to query a single node field (graphene.Field with same model), the weird Anonymous User issued popped up again...
When I also explicitly override JWT_ALLOW_ANY_HANDLER in my settings, then both DjangoFilterConnectionFields and graphene.Fields work perfectly.

It seems like something about this bug is triggered in connection with allow_any. Anyone else have any insights here?

I'm still not sure why I'm seeing this behavior, but it is NOT due to the your package. I started with a fresh Django project and your package works flawlessly as documented. I haven't figured out why I'm seeing the weird behavior I documented, but I am rebuilding my project one step at a time to see if it comes again. If I manage to isolate the cause, I'll let you folks know.

We had the same issue with graphene v3. As a workaround, we copy-pasted the allow_any function from 2f670d7 and set JWT_ALLOW_ANY_HANDLER to use that version of the allow_any function.
django==3.2.9
django-graphql-jwt==0.3.4
graphene==3.0b8
graphql-core==3.1.6
graphene-django==3.0.0b7

Today I created a new project from scratch to see if the problem is related to our codebase.
I think I have found an interesting case.
Problem
In our codebase, we named our query RootQuery.
class RootQuery(
    AQueryMixin,
    BQueryMixin,
    CQueryMixin,
    graphene.ObjectType,
):
    pass

schema = graphene.Schema(query=RootQuery, mutation=RootMutation)

But allow_any function expects a type called Query in the info.schema because operation_name is Query.
def allow_any(info, **kwargs):
  operation_name = get_operation_name(info.operation.operation).title()
  # operation_name == "Query"
  field = info.schema.get_type(operation_name).fields.get(info.field_name)
  # info.schema.get_type("Query") == None
  # so info.schema.get_type("Query").fields raises an error
  # It should have been info.schema.get_type("RootQuery")

Solution
Renaming RootQuery to Query fixed the error on both our codebase and the project I started from scratch.
@JSv4 Can you conform that this solution works for you, too?

@msimav, I'll try to give it a shot this weekend.

Finally had some time to work on this again...
So, first off, my root Query is called Query, so I don't think I have the same root cause as you, @msimav. This bug is definitely caused somehow by the operation names, however, as this is my stack trace when I tried the other fix you suggested using from #2f670d7:
| ERROR 2021-12-10 04:23:45,751 executor 11<PHONE_NUMBER>28768 An error occurred while resolving field Mutation.addTokenAnnotation
django          | Traceback (most recent call last):
django          |   File "/usr/local/lib/python3.9/site-packages/graphql/execution/executor.py", line 452, in resolve_or_error
django          |     return executor.execute(resolve_fn, source, info, **args)
django          |   File "/usr/local/lib/python3.9/site-packages/graphql/execution/executors/sync.py", line 16, in execute
django          |     return fn(*args, **kwargs)
django          |   File "/usr/local/lib/python3.9/site-packages/graphql_jwt/middleware.py", line 71, in resolve
django          |     ) and self.authenticate_context(info, **kwargs):
django          |   File "/usr/local/lib/python3.9/site-packages/graphql_jwt/middleware.py", line 46, in authenticate_context
django          |     if jwt_settings.JWT_ALLOW_ANY_HANDLER(info, **kwargs):
django          |   File "/app/config/graphql/auth/jwt.py", line 7, in allow_any
django          |     f'{info.operation.operation.name.lower()}_type',
django          | AttributeError: 'str' object has no attribute 'name'
django          | ERROR 2021-12-10 04:23:45,751 utils 11<PHONE_NUMBER>28768 Traceback (most recent call last):
django          |   File "/usr/local/lib/python3.9/site-packages/graphql/execution/executor.py", line 452, in resolve_or_error
django          |     return executor.execute(resolve_fn, source, info, **args)
django          |   File "/usr/local/lib/python3.9/site-packages/graphql/execution/executors/sync.py", line 16, in execute
django          |     return fn(*args, **kwargs)
django          |   File "/usr/local/lib/python3.9/site-packages/graphql_jwt/middleware.py", line 71, in resolve
django          |     ) and self.authenticate_context(info, **kwargs):
django          |   File "/usr/local/lib/python3.9/site-packages/graphql_jwt/middleware.py", line 46, in authenticate_context
django          |     if jwt_settings.JWT_ALLOW_ANY_HANDLER(info, **kwargs):
django          |   File "/app/config/graphql/auth/jwt.py", line 7, in allow_any
django          |     f'{info.operation.operation.name.lower()}_type',
django          | graphql.error.located_error.GraphQLLocatedError: 'str' object has no attribute 'name'

This is the error I was seeing when I first opened this issue. The fix that works for me (and which, as I said, I am a little uncomfortable with as I don't really understand the root cause here and I'm using a naive try / except) is the allow_any method I suggested above:
def allow_any(info, **kwargs):
    try:
        operation_name = get_operation_name(info.operation.operation).title()
        operation_type = info.schema.get_type(operation_name)

        if hasattr(operation_type,'fields'):

            field = operation_type.fields.get(info.field_name)

            if field is None:
                return False

        else:
            return False

        graphene_type = getattr(field.type, "graphene_type", None)

        return graphene_type is not None and issubclass(
            graphene_type, tuple(jwt_settings.JWT_ALLOW_ANY_CLASSES)
        )
    except Exception as e:
        return False

Any idea on what is the purpose of checking if the fields attribute exists in the first place?

I don't understand what's happening, but renaming my query from RootQuery to Query solved it for me. Upgrading packages on an old project.

is it renaming all root queries in the files to Query that fixed it ?

Yep, RootQuery to Query and RootMutation to Mutation.

Today I created a new project from scratch to see if the problem is related to our codebase. I think I have found an interesting case.
Problem
In our codebase, we named our query RootQuery.
class RootQuery(
    AQueryMixin,
    BQueryMixin,
    CQueryMixin,
    graphene.ObjectType,
):
    pass

schema = graphene.Schema(query=RootQuery, mutation=RootMutation)

But allow_any function expects a type called Query in the info.schema because operation_name is Query.
def allow_any(info, **kwargs):
  operation_name = get_operation_name(info.operation.operation).title()
  # operation_name == "Query"
  field = info.schema.get_type(operation_name).fields.get(info.field_name)
  # info.schema.get_type("Query") == None
  # so info.schema.get_type("Query").fields raises an error
  # It should have been info.schema.get_type("RootQuery")

Solution
Renaming RootQuery to Query fixed the error on both our codebase and the project I started from scratch. @JSv4 Can you conform that this solution works for you, too?

This worked for me, thanks.

Today I created a new project from scratch to see if the problem is related to our codebase. I think I have found an interesting case.
Problem
In our codebase, we named our query RootQuery.
class RootQuery(
    AQueryMixin,
    BQueryMixin,
    CQueryMixin,
    graphene.ObjectType,
):
    pass

schema = graphene.Schema(query=RootQuery, mutation=RootMutation)

But allow_any function expects a type called Query in the info.schema because operation_name is Query.
def allow_any(info, **kwargs):
  operation_name = get_operation_name(info.operation.operation).title()
  # operation_name == "Query"
  field = info.schema.get_type(operation_name).fields.get(info.field_name)
  # info.schema.get_type("Query") == None
  # so info.schema.get_type("Query").fields raises an error
  # It should have been info.schema.get_type("RootQuery")

Solution
Renaming RootQuery to Query fixed the error on both our codebase and the project I started from scratch. @JSv4 Can you conform that this solution works for you, too?

18 months later, I lost a half day trying to work out why a code refactor had broken JWT authentication.....and it was exactly this.  Great post!


Improve the navbar:  page and navbar mixed

Describe the bug
The navbar it not looking good and is mixed with the page.

Expected behaviour
I would like to improve the navbar so that it looks good.
Please assign this issue to me under GSSOC'23 . I want to work on this.
Screenshots
No response
Additional context
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

I would like to work on it. Please assign me

The navbar has been updated.


ut-control: build and use CMAKE for libwebsockets instead of using the installed cmake

Problem: cmake is not available on all environments, and this is required for the ut-control building.
Fix: detect if cmake is present before building occurs, if it's not present, then cmake will be downloaded and built and provided in order to build the requirements for ut-control locally.

related to #23


URL from pypi is invalid

If you go to https://pypi.org/project/Werkzeug/ and click homepage you get a 404 because homepage is https://www.palletsprojects.org/p/werkzeug/ instead https://github.com/pallets/werkzeug

Correct link is https://palletsprojects.com/p/werkzeug/ - PR will be appreciated! :)

Already fixed in master.


Script fails after virtual machine is restarted

Script fails with the following error:
Restart Docker Machine ... 		Too many retries waiting for SSH to be available.  Last error: Maximum number of retries (60) exceeded
I am not able to connect to the machine even with docker-machine ssh

Can you try to restart it again? And print the logs /var/log/bootlocal.log and /var/log/boot2docker.log.
If you can't re-access the virtual machine (hopefully not an important one), can you try again with another machine?
Also are you using last versions of everything?

The status of the machine is "running". SSH does not work. It was not an important machine... I recreated the machine and re-ran everything. But it fails at nfs verification.
Checked that the host nfs server is running. The following is on the bootlocal.log:
mount: mounting <IP_ADDRESS>:/Users on /Users failed: Bad file descriptor
I am running the docker-toolbox 1.9.0d. Boot2Docker version 1.9.0, build master : 16e4a2a - Tue Nov  3 19:49:22 UTC 2015. Docker version 1.9.0, build 76d6bc9

Updated to docker-toolbox 1.9.1b. Boot2Docker version 1.9.1, build master : cef800b - Fri Nov 20 19:33:59 UTC 2015. Docker version 1.9.1, build a34a1d5.
cat /var/log/bootlocal.log
Starting nfs client utilities.
root@test:~# /usr/local/etc/init.d/nfs-client start
/usr/local/sbin/rpcbind is already running
1051
/usr/local/sbin/rpc.statd is already running
1055
Starting nfs client utilities.
root@test:~# /usr/local/etc/init.d/nfs-client status
NFS-client is not running.

@nithin-bose Can you reboot your mac? Seems related to: https://github.com/adlogix/docker-machine-nfs/issues/22#issuecomment-160656738

restarted.... but same as above

Further on this, I am able to ping <IP_ADDRESS> (host) from <IP_ADDRESS> (vm) immediately after creating woth docker-machine. However after running docker-machine-nfs, ping from the host fails. However, pinging something outside, like ggogle.com works.... could it be that the network settings are affected somehow??

Certain that no firewall is blocking this? Cause another user had that case too.

No firewalls, unless boot2docker or virtual box has one. Mac firewall is off.

I know this was already brought up, but I was having this exact same issue and I used the workaround commands below, which worked:
docker-machine regenerate-certs dev
docker-machine-nfs dev

This works overtime, although I know it's a workaround:
Setup Dev Environment
docker-machine create --virtualbox-memory "4096" --virtualbox-disk-size "20000" --virtualbox-cpu-count "2" --driver virtualbox dev
docker-machine env dev
eval "$(docker-machine env dev)"
docker-machine regenerate-certs dev
docker-machine-nfs dev --nfs-config="-alldirs -maproot=0"
PS - I really wish someone who had the skills would just build this into docker ... ::wink-wink::

@brandontamm I will try this out and let you know

Tried this.... same issue... after running docker-machine-nfs even ping from boot2docker to host machine fails.
Boot2Docker version 1.9.1, build master : cef800b - Fri Nov 20 19:33:59 UTC 2015
Docker version 1.9.1, build a34a1d5

root@test:~# ping <IP_ADDRESS>
PING <IP_ADDRESS> (<IP_ADDRESS>): 56 data bytes

--- <IP_ADDRESS> ping statistics ---
60 packets transmitted, 0 packets received, 100% packet loss

root@test:~# /usr/local/etc/init.d/nfs-client status
NFS-client is not running.

root@test:~# /usr/local/etc/init.d/nfs-client start
/usr/local/sbin/rpcbind is already running
1021
/usr/local/sbin/rpc.statd is already running
1024
Starting nfs client utilities.
root@test:~# /usr/local/etc/init.d/nfs-client status
NFS-client is not running.

Hey @nithin-bose ,
When you ssh in your machine, can you ping your host ? (Not the <IP_ADDRESS>)

Did not get you. <IP_ADDRESS> is my host and <IP_ADDRESS> is my boot2docker vbox guest machine. The same is used for nfs as well. The commands above are from the boot2docker guest. Ping works fine if I docker-machine ssh and do it before running docker-machine-nfs.

On my machine I also have the <IP_ADDRESS> which is an ip from virtualbox (vboxnet4), but my actual ip from my host (mac os) is 10.0.0.X ... the ip received from my router. Can you ping that one from your guest?
Not sure this test is worth anything. I'm no expert in all underlying network stuff. Just trying to figure out why your nfs is not connecting between host<->guest.
Cheers
T

I dont see any 10.* ip in my ifconfig. I only have a vboxnet0 adapter which shows the ip to be <IP_ADDRESS> :( event i dont understand why its not working.... your script is simple enough.... nfs-client seems to hang.... the same is the case with my friend too.... which versions are you on?

Hey @nithin-bose ,
My ip is 10.* because my router is in that range. But it could be very well another ip. Most routers give an ip in a range of 192.168.0.X . Anyway not sure this will tell anything.
For all the things a I use, all are at latest version.

Oh sorry.... vbox used to give ip in the 10.* range so i thought you were refering to that. I will check this out and let you know. Thank you for your patience :+1:

@tonivdv and @nithin-bose my workaround actually quit working. I have no clue why it worked for awhile and now doesn't work.
I can't seem to get this to work consistently and I am out of ideas :(

Same here, with a fresh installation starting from the last docker toolbox, the nfs share doesn't work.
Darwin paolospark 14.4.0 Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64

docker-machine create dev -d virtualbox --virtualbox-disk-size 50000 --virtualbox-cpu-count 1 --virtualbox-memory 4096
docker-machine-nfs dev --nfs-config="-alldirs -maproot=0"

[cut]
[INFO] Configure Docker Machine ... 		OK
[INFO] Restart Docker Machine ... 		OK
[INFO] Verify NFS mount ... 			FAIL

Cannot detect the NFS mount :(

~ ❯ docker-machine ssh dev docker --version
Docker version 1.9.1, build a34a1d5

Problem fixed, it was missing the <IP_ADDRESS> localhost entry on my /etc/hosts.

@paolomainardi which hosts file was missing this entry the host or guest?

@nithin-bose It should be on the host. Guest doesn't have to be touched on that level.


[Marker.io] are we sure that only "view" button should take the user to the respective page on "search results"

Steps to reproduce:

on search results, seaarch for "Employee"
go to "pages and articles" section
3)try to click the image or title and description

Actual result: currently only "view" button takes theuserto respective page
Expected result:
should we make the "image" , "title" and "description" clickable too ?

Reported by: vinod<EMAIL_ADDRESS>- Contact via Marker.io
Source URL: https://na13-prezzee.webflow.io/en-us/search?query=employee
Issue details: Open in Marker.io
Device typedesktopBrowserChrome <IP_ADDRESS>Screen Size1366 x 768OSWindows 10 (10.0.0)Viewport Size1366 x 641Pixel Ratio@1x

@ckosik1 please have a look at this suggestion.
if we would like to do something abt this, assign it to @Druhin13 .

@vinod-ku1989 Thanks for the suggestion - It's intended


intellisense only shows once or twice then disappears

Issue Type: Bug
Im busy editing a file with extension .jsx and have installed the simple react snippets, now the intellisense only shows up a couple of times before not working at all, even the standard snippets, is this a bug or a configuration on my program?
VS Code version: Code 1.41.1 (26076a4de974ead31f97692a0d32f90d735645c0, 2019-12-18T14:58:56.166Z)
OS version: Windows_NT x64 10.0.18362

System Info

Item
Value

CPUs
Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz (8 x 1800)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: enabledrasterization: enabledskia_renderer: disabled_offsurface_control: disabled_offsurface_synchronization: enabled_onvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
7.89GB (1.49GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions (11)

Extension
Author (truncated)
Version

simple-react-snippets
bur
1.2.2

bracket-pair-colorizer
Coe
1.0.61

vscode-faker
dee
1.3.0

vscode-html-css
ecm
0.2.3

prettier-vscode
esb
3.18.0

auto-rename-tag
for
0.1.1

LiveServer
rit
5.6.1

php-formatter
Sop
0.2.4

ayu
tea
0.18.0

highlight-matching-tag
vin
0.9.6

vscode-icons
vsc
9.7.0

/needsMoreInfo
Please provide detailed steps for how to reproduce the problem.
Is there anything in the TypeScript log when Intellisense stops working? The TypeScript log is shown when running the command TypeScript: Open TS Server log

ts-server-details.txt
attached the server details as requested.

Does this reproduce in the latest VS Code insiders build with all extensions disabled?

so it seems to only reproduce in large projects , but when I reinstalled the project using npm i , then it seemed to work again, very strange


[Snyk] Security upgrade org.springframework:spring-context from 5.3.18 to 5.3.19

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to fix one or more vulnerable packages in the `maven` dependencies of this project.
Changes included in this PR

Changes to the following files to upgrade the vulnerable dependencies to a fixed version:

pom.xml

Vulnerabilities that will be fixed
With an upgrade:

Severity
Priority Score (*)
Issue
Upgrade
Breaking Change
Exploit Maturity

471/1000  Why? Recently disclosed, Has a fix available, CVSS 3.7
Improper Handling of Case Sensitivity SNYK-JAVA-ORGSPRINGFRAMEWORK-2689634
org.springframework:spring-context:  5.3.18 -> 5.3.19
No
No Known Exploit

(*) Note that the real score may have changed since the PR was raised.
Check the changes in this PR to ensure they won't cause issues with your project.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
🛠 Adjust project settings
📚 Read more about Snyk's upgrade and patch logic

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Learn about vulnerability in an interactive lesson of Snyk Learn.

Coverage remained the same at 100.0% when pulling 9a592fbc8e3e0958ae202ac4253141e4e7a88800 on snyk-fix-4677ea1d36c78db0494326769cf49711 into 8aecb962551e7a011db7e1fa2f37ac881cf18845 on master.


Unresolved dependencies when installing phoenix for development

Install it
go get github.com/csaunders/phoenix
Issue
Missing dependency on fsnotify.v1 which stops the world.
Temporary fix for now
go get https://gopkg.in/fsnotify.v1

Yeah, just got around to trying this out on a new go installation and the mentioned command works.
I'll update the documentation for contributors

Yeah, just got around to trying this out on a new go installation and the mentioned command works.
I'll update the documentation for contributors


Returns the standone alone question while using ConversationalRetrievalChain

Feature request
I am using the ConversationalRetrievalChain to retrieve answers for questions while condensing the chat history to a standalone question.  However, the standalone question would show in the streaming output.
I expect only to return the final answer. Is there any way to achieve it?
Motivation
The immediate is not necessary for the answer.
Your contribution
I am not sure.

Yes, the problem also occurs for me. I'm using ConversationalRetrievalChain with streaming, but when there is memory, the response I receive is the question itself

I don't know if it helps, but I can send some prints, look:
This is my input using fastapi (the question is in Portuguese BR):

This is the response in terminal ():

Response in fastapi:


Support for other LLMs, local LLMs, etc

This issue is a catch all for questions about using aider with other or local LLMs. The text below is taken from the FAQ.
Aider provides experimental support for LLMs other than OpenAI's GPT-3.5 and GPT-4. The support is currently only experimental for two reasons:

GPT-3.5 is just barely capable of editing code to provide aider's interactive "pair programming" style workflow. None of the other models seem to be as capable as GPT-3.5 yet.
Just "hooking up" aider to a new model by connecting to its API is almost certainly not enough to get it working in a useful way. Getting aider working well with GPT-3.5 and GPT-4 was a significant undertaking, involving specific code editing prompts and backends for each model and extensive benchmarking. Officially supporting each new LLM will probably require a similar effort to tailor the prompts and editing backends.

Numerous users have done experiments with numerous models. None of these experiments have yet identified other models that look like they are capable of working well with aider.
Once we see signs that a particular model is capable of code editing, it would be reasonable for aider to attempt to officially support such a model. Until then, aider will simply maintain experimental support for using alternative models.
More information
For more information on connecting to other models, local models and Azure models please see the FAQ.
There are ongoing discussions about LLM integrations in the aider discord.
Here are some GitHub issues which may contain relevant information.

Why not have a unified API that you could provide then a plugin system to integrate other LLMS, then you can just provide gpt-3.5 and gpt-4 plugins officially yourself.

Per the FAQ, there are already some very useful hooks for connecting to other LLMs. Per those other linked issues, a number of users have been using them to experiment with local LLMs.
Aider already has a modular system for building different "coder" backends, allow customization of prompts and edit formats.
So all the raw materials seem to be here for anyone who wants to get aider working with new models. I'm always happy to advise as best I can.

Great work, has anyone confirmed a successful usage with other local LLMs? It's not about cheapness, we still don't have access to ChatGPT API nor being able to pay for any alternatives.

hello! great news! there is another contender in the ecosystem of open source llm-coders
Yesterday I tested quantized version https://huggingface.co/TheBloke/NewHope-GGML (The bloke also released GPTQ version). Running in local using ooba textgen and activating opeanai extension. What I read is that is a llama2 model finetuned similar to wizardcoder
Seems to be better than wizardcoder but still needs effort to adjust prompts to run and be usable.

The NewHope model was retracted because it was contaminated with test data causing overfit.
https://twitter.com/mathemagic1an/status/1686814347287486464?s=46&t=hIokEbug9Pr72tQFuXVULA
So far none of the models come close to gpt and cannot follow instructions well enough to work with aider.

@aldoyh
#170 might be of interest - are you able to access the openrouter apis?

Hey @paul-gauthier, while this question isn’t directly related to using other LLMs, I was wondering your advice for where to poke around to embed additional context into the prompt.
My friend and I are putting together a context embedding for some relevant up to date developer documentation and would love to try aider in conjunction with that context.
Thanks for this tool!

To reply I had to research that and it's my answer.
No, didn't know about it and going to check it out.. but even if I deployed a LocalAI, isn't there a way to make Aider look at it?

@aldoyh Have a look at my comments in https://github.com/paul-gauthier/aider/issues/138

Appreciate your work on this project. This represents one of the biggest missing pieces between LLM and real code writing utility, so well done.
I read the bits about how hard it is to add new models, I just want to request you take a look at Claude 2. v2 added some big improvements on the code side, and while it is still dumber than GPT-4, it has a more recent knowledge cutoff. Plus massive context.
I understand you are working around context limitations with ctags, but it could be interesting to see if there is an advantage to being able to load the entire project in context with Claude. But regardless, I think that Claude is hot on the heels of GPT-4, and if the reporting on it being a 52B model is true then it is already significantly smarter (pound for pound).
Just my 2c anyway

I agree that the Claude models sound like they are the most likely to be capable of working well with aider. I have been waiting for an api key for months unfortunately. My impression is that it is very difficult to get a key, which limits the benefits of integrating Claude into aider. Not many folks could use it.

Paul, perhaps try openrouter, which seem sidestep the key issue, and give access to claude directly..

Yes, I am aware of openrouter. But that is a confusing extra layer to explain to users. Most users won't have direct Claude api access. And I won't be able to test aider directly against the Claude api. It's all sort of workable, but far from ideal.

Paul, perhaps try openrouter, which seem sidestep the key issue, and give access to claude directly..

Yes, I am aware of openrouter. But that is a confusing extra layer to explain to users. Most users won't have direct Claude api access. And I won't be able to test aider directly against the Claude api. It's all sort of workable, but far from ideal.

I like the idea of an easily extendable system, e.g a flag --bot that exports a class with this structure:
export default class MyCoolBot {
   requirements = [
      {
         id: "apiKey",
         name: "API Key",
         type: "string",
         required: true,
      }
   ];
   constructor({apiKey}){

   }
   createConversation() --→ ConvoParams
   sendMessage(message, {conversation: ConvoParams, progress, done})
   // Other optional methods such as deleteConversation, deleteMessage, editMessage, retryMessage, etc
}

This would be easily inspectable by Aider to check if this bot supports retrying, editing, etc as well as supporting the required parameters.

https://xkcd.com/927/

When it comes to the coding capabilities of local LLMs, I believe that the HumanEval (pass@1) is the most important metric.
The leaderboard lists "Starcoder-16b" as the best open model with a score of 0.336 compared to GPT-4 score of 0.67.
But we also have 2 GPT-3.5 models at 0.48/0.46. But here's the thing, There's also the "WizardLM-70B-V1.0" which no one has added to the leaderboards yet but it actually has a higher score than GPT-3.5 at 0.506.
I don't have a machine powerful enough to run it but I think that with minor tweaking it should perform as well as GPT-3.5
All this being said, I'm not a dev and I haven't tested any of this and honestly don't fully understand all the steps that autonomous agents like Aider take to get it to work.
Just though that I'd mention it in case it's useful to someone.
And Paul, great work with everything here. Really cool

I agree that the Claude models sound like they are the most likely to be capable of working well with aider. I have been waiting for an api key for months unfortunately. My impression is that it is very difficult to get a key, which limits the benefits of integrating Claude into aider. Not many folks could use it.

Hey Paul,
I'd be happy to lend you my API key to use for testing. There's a max of 1 call at a time, so if you can deal with that limitation - all good!

I'd be happy to lend you my API key to use for testing.

Thanks @JamesSKR. I have a loaner API key already. But again, so few people have Claude API access that it's not going to be very impactful to get aider working with Claude. Almost no one could use it. I definitely want to experiment with Claude, but it's not super high priority right now for that reason.

Adding support for the recently released Code llama (perhaps using cria?) would be very interesting imo, what do you think @paul-gauthier?

Hi Paul, thank you for such a great project.  Love what you've done so far.  I was also wondering if you've tested the PalM API from Google, just wondering if its any good?

@samuelmukoti I tested the palm models a little while working on the openrouter integration - they were ok, but similar to lama needed a bit of coaxing to output responses in a format aider would understand.

Just tested out the main branch with text-generation-webui's openAI API endpoint and it worked right away.
Here it is with Llamacoder:

Wow that’s exciting.. hope you can conduct further tests and share how the performance is compared to gpt3.5
thanks for sharing

I wonder if there's a way to get ctags working 🤔

@sammcj Have you tried asking it to edit code?

ollama is by far the easiest way!!
On Fri, Aug 25, 2023 at 17:27 John Vaughan @.***> wrote:

@sammcj https://github.com/sammcj, how did you setup the API for the
Llamacoder? I am interested in giving this a try. Thanks
—
Reply to this email directly, view it on GitHub
https://github.com/paul-gauthier/aider/issues/172#issuecomment-1693954446,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ATHQYAGIQ3Z4C7XYOQJEZA3XXEKEPANCNFSM6AAAAAA3BOLHYA
.
You are receiving this because you commented.Message ID:
@.***>

@paul-gauthier Did you have a sample file and prompt that you’d like to provide to compare it to something you’d run against gpt3.5?? I can try it out and provide the results.

@sammcj Try the tests in the Examples folder.
Here is one of them https://github.com/paul-gauthier/aider/blob/main/examples/hello-world-flask.md

FYI You can use llama.cpp to run local models with an openai compatible server with no-or-little code modifications
https://github.com/ggerganov/llama.cpp/discussions/795
I've yet to try but I'm excited to try this with llama code

Here is how I run it
I have a script called server.sh to fire up the server
#!/bin/sh
export HOST=<IP_ADDRESS>  &&python3 -m llama_cpp.server --n_threads 4  --model  models/wizardcoder-python-34b-v1.0.Q2_K.gguf --n_ctx 16384
Then run aider from bash
aider --openai-api-base=http://<IP_ADDRESS>:8000 --openai-api-key=dummy  --model=gpt-3.5-turbo --edit-format whole  -v calculator.c --no-pretty --verbose

@apcameron
Can you try this with the new Code Llama model?
"The Code Llama models provide stable generations with up to 100,000 tokens of context.
All models are trained on sequences of 16,000 tokens and show improvements on inputs with up to 100,000 tokens."
https://ai.meta.com/blog/code-llama-large-language-model-coding/
https://www.geeky-gadgets.com/how-to-install-code-llama-locally/

@marvin-hansen I have tried it with https://huggingface.co/TheBloke/CodeLlama-34B-Instruct-GGUF but I found that the Wizardcoder was better for me. You need to try the different models and see which is best for your use case.

I wonder if there's a way to get ctags working 🤔

change the model to gpt-4 maybe

💪😃Got it working with oobabooga text web UI using --share link as the API replacement.
Model: TheBloke_WizardCoder-Python-34B-V1.0-GPTQ

Can you share a small video on how to?

Enable the openai setting as well. That should enable port 5001 which is what you use.

https://github.com/paul-gauthier/aider/assets/4990091/8e0918be-1a83-4b3f-9ee0-07c757b6a766
@jdvaugha @lvalics
Here is the video and you can pass this flag it in terminal when you start the text-generation-webui:
python server.py --extensions openai
the endpoint for local use:
http://<IP_ADDRESS>/v1 **or** http://localhost:5001/v1/models
to use the endpoint from anywhere using text-generation-webui :
python server.py --extensions openai --share
this will create a temporary share link and you can access the web UI and OpenAI endpoint from anywhere
To get better results use better GPU ⚡💵

Thank you. I will do today a server on runpod and see if I can get that into, to not use my local machine. It will be faster I hope.

opeai-w-aider.mp4
@jdvaugha @lvalics
Here is the video and you can pass this flag it in terminal when you start the text-generation-webui: python server.py --extensions openai  the endpoint for local use: http://<IP_ADDRESS>/v1 **or** http://localhost:5001/v1/models
to use the endpoint from anywhere using text-generation-webui : python server.py --extensions openai --share this will create a temporary share link and you can access the web UI and OpenAI endpoint from anywhere
To get better results use better GPU ⚡💵

Not all Heros wear capes. ❤🔥💯🙏

It is working via Runpod, needed to change in some places <IP_ADDRESS> to <IP_ADDRESS> but is working fast .. now Ineed to test with my local projects.

tested more. I can ask to create a tetris game and working, but if I add an existing code and ask to do something, I get no response.

man, this is making me excited!

The text-generation-webui route is not working for me with ExLlamaV2, garbage (unprintable characters) are produced by aider. Seems to work with V1.
I've run into "The chat session is larger than the context window!" a few times now when playing around too. Is there any way to fix that? WizardCoder-34B doesn't appear to be smart enough to produce the edit blocks in diff mode when instructed to, so I guess I'll run into that a lot?

@ystoll I saw BigArt's server code, yeah, but I haven't run it so far. I've continued my journey into messing with text-generation-webui. I've changed a bunch of settings (and even code!) and now it actually somewhat works.
Seeing my best results so far from manual testing, but it's still not good enough for Aider use. Currently in the process of switching out CodeLlama-34B for airoboros-c34b-2.1 which should be a better fit for exact instruction following, but no download is currently available in a format that works for me so I'm doing the conversion/quantizing myself which is a trip and will be a while.

@Chainfire  On my side, I managed to start the benchmark but keep getting several out of context errors.
I load the model via a JSON payload which  I request to the text-generation-webui API (see for instance api
I will try your hack and I'll give you a feedback on it. Thank you!

Actually to be perfectly clear, I am doing the following.
Starting the server:
python3.10 server.py --extensions openai --share --api
Loading the model:
`
model = "TheBloke_WizardCoder-Python-34B-V1.0-GPTQ"
req = {
        'action': 'load',
        'model_name': model,
        'args': {
            'loader': 'ExLlama',
            'temperature': 0.5,
            'top_p': 0.7,
            'top_k': 50,
            'typical': 0,
            'num_beams': 5,

            'n_gpu_layers': 40,
            'n_ctx': 4096,
            'threads': 1,

            'bf16': False,
            'load_in_8bit': False,
            'groupsize': 0,
            'wbits': 0,

            'n_batch': 512,
            'no_mmap': False,
            'mlock': False,
            'cache_capacity': None,

        },
    }

requests.post(f'http://'localhost:5000/api/v1/model', json=req)
`
and I monitor my GPU to check that the model is indeed loaded.
Starting the benchmarks tests (once in the container):
`
export OPENAI_API_BASE="http://localhost:5001/v1"
export OPENAI_API_KEY="dummy_key" # just to make sure...
python3.10 benchmark/benchmark.py "$NAME_BENCHMARK" --new
--clean
--tries 2
--num-tests 15
--threads 2
--edit-format whole
`
The tests starts but I have a lot of context errors:
The chat session is larger than the context window!
Maybe I am missing something here....

@Chainfire
I tested your solution.
The problem is that, despite the fact that I use the proper flags, the model does not seem to load when I launch server.py:
export OPENEDAI_DEBUG=True
python3.10 server.py \
    --model-dir /oobabooga/text-generation-webui/models/ \
    --loader ExLlama \
    --model TheBloke_WizardCoder-Python-34B-V1.0-GPTQ \
    --max_seq_len 16384 \
    --listen \
    --api \
    --extensions openai \
    --mlock \
    --settings wizardcoder-34b.yaml \
    --verbose

Is there anyway to see if a model is loaded or not at startup ?

It seems to work now: I missed a dependency. Doing a:
pip install flask-cloudfared

seems to have solved the issue.

@paul-gauthier et al. - I know this topic has seemingly been beaten to death... and I understand. HOWEVER - have you tried working with the Google Vertex (PALM 2) APIs? namely code-bison-32k

@asifjahmed I ran some benchmarks against palm2-codechat-bison available on openrouter - https://openrouter.ai/docs
results weren't great, much worse than gpt3.5

With some fiddling around, I was able to use LiteLLM wrapper for HuggingFace TGI to process Code Llama TGI responses.

Thanks to @abhinavkulkarni's feedback - we also have this as a tutorial
https://docs.litellm.ai/docs/proxy_server#tutorial---using-with-aider

so few people have Claude API access that it's not going to be very impactful to get aider working with Claude. Almost no one could use it. I definitely want to experiment with Claude, but it's not super high priority right now for that reason.

It looks like things have changed with Claude availability: Claude on Amazon Bedrock now available to every AWS customer

Thanks to @abhinavkulkarni's feedback - we implemented a 1-click openai proxy and have this as a tutorial
https://docs.litellm.ai/docs/proxy_server#tutorial---using-with-aider
Works across TGI / Palm / Anthropic / TogetherAI / Ollama etc.

Well, this does not seem to work in my case:
  File "/home/user/demo_aider/.venv.aider.pip/lib/python3.10/site-packages/litellm/utils.py", line 2456, in exception_type
    raise APIError(status_code=500, message=error_str, model=model, llm_provider=custom_llm_provider)
litellm.exceptions.APIError: HTTPSConnectionPool(host='my-endpoint.huggingface.cloud', port=443): Max retries exceeded with url: / (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f360c2d0400>: Failed to resolve 'my-endpoint.huggingface.cloud' ([Errno -2] Name or service not known)"))

@ystoll that's a stubbed url - my-endpoint.huggingface.cloud <- replace this with your own hosted endpoint :D
i'll update docs to make that more clear

@ystoll that's a stubbed url - my-endpoint.huggingface.cloud <- replace this with your own hosted endpoint 😄
i'll update docs to make that more clear

I misunderstood : I was hoping that I would be able to use litellm locally with an endpoint hosted on my personal GPU.
Reading the docs, creating an endpoint on hugginface is far from being free. And I do not want to invest money on cloud tech for now.

oh @ystoll you can call litellm locall with a local endpoint
If you want to do it via the proxy - here's the line
litellm --model huggingface/your-model-name \
  --api_base http://your-local-endpoint \

In a python script
from litellm import completion

response = completion(model="huggingface/<your-model-name>", messages=[{"role": 'user", "content": "Hey!"}], api_base="http://your-local-endpoint")

Anything in the docs that made you feel otherwise?

You can use litellm to connect to locally hosted LLM's and even to connect to Petals using the example below
Here's the cli command
litellm --model petals/petals-team/StableBeluga2
and it'll spin up an openai-compatiable proxy server at port: 8000.
Just set the openai api base to this and it'll start making petals calls
openai.api_base = "http://localhost:8000"

@ystoll you can call litellm locall with a local endpoint
If you want to do it via the proxy - here's the line
litellm --model huggingface/your-model-name \
  --api_base http://your-local-endpoint \

In a python script
from litellm import completion

response = completion(model="huggingface/<your-model-name>", messages=[{"role": 'user", "content": "Hey!"}], api_base="http://your-local-endpoint")

Anything in the docs that made you feel otherwise?

Can you give complete example of what you are saying? For example, if a huggingface model is downloaded in the path "C:\local-models\wizardcoder-python-34b-v1.0.Q5_K_M.gguf", how do you load this model and start the API end point?

@krrishdholakia  Can you give complete example of what you are saying? For example, if a huggingface model is downloaded in the path "C:\local-models\wizardcoder-python-34b-v1.0.Q5_K_M.gguf", how do you load this model and start the API end point? Or is litellm not capable of loading and can only do API translation? Please clarify.

@b4git the proxy does api translation. I think for local models you might want to try LocalAI or VLLM which spin up openai compatible servers.

Re your initial comments above, Code Llama is being reported as even more capable with code than GPT-4...

As @paul-gauthier has said, the difficulty is not in connecting to a local LLM via LiteLLM or otherwise, but adjusting the prompts. I haven't had a chance to look into aider's code yet. If you could provide some direction @paul-gauthier , I'd be happy to start working on a backend. Is there one in particular you think could work better than GPT 3.5? Code Llama perhaps?

@mweichert based on the discord discussions, I don't think I've seen anyone report a local model working even as well as gpt-3.5. Most seem significantly worse.
My guess is that the Claude models are the most promising to work well with aider. When I have the time, that's likely the next model I will try and integrate with aider.

is there instructions somewhere, where we can use azure openai endpoint, specifically the gpt-4-32k variant and increasing the tokens from 8k to 32k in aider?

@adminailab there's a FAQ entry that might contain helpful information:
https://aider.chat/docs/faq.html#azure

May I please have a link/invite to the discord? The one in the FAQ didn't allow me to join. It said there were no text channels

@sudomain
https://discord.gg/Tv2uQnR88V

@paul-gauthier thanks for the response. I couldn't get it to work via the instruction on FAQ.
What worked for me was litellm as proxy. Below are the steps for reference for others:

https://docs.litellm.ai/docs/proxy_server#tutorial---using-with-aider

once local host is running, set the following on your aider.conf.yml.
openai-api-key:(azure key)
openai-api-base: http://<IP_ADDRESS>:8000
model: azure/(your deployment name)

in openai.py, append this code:

(the 'gpt4-32-0613' is the name of my deployment)

in openai.py, modify this code:

in tiktoken/model.py, add the encoding of your deployment:

tokens will now be 32k:

I am planing to connect aider to my local LM studio API (OpenAI compatible local server). I managed to get GPU support for LM Studio out of the box. :-)

@paul-gauthier thanks for the response. I couldn't get it to work via the instruction on FAQ.
What worked for me was litellm as proxy. Below are the steps for reference for others:

https://docs.litellm.ai/docs/proxy_server#tutorial---using-with-aider
once local host is running, set the following on your aider.conf.yml.
openai-api-key:(azure key)
openai-api-base: http://<IP_ADDRESS>:8000
model: azure/(your deployment name)
in openai.py, append this code:

(the 'gpt4-32-0613' is the name of my deployment)

in openai.py, modify this code:

5. in tiktoken/model.py, add the encoding of your deployment:

6. tokens will now be 32k:

Hey @adminailab you could have just done this in 1 line:
litellm --model azure/gpt4-32-0613 --max_tokens 32000

now the server will always just call your deployment and pass it this max token number
was this unclear? or am i missing something?

@krrishdholakia

@paul-gauthier thanks for the response. I couldn't get it to work via the instruction on FAQ.
What worked for me was litellm as proxy. Below are the steps for reference for others:

https://docs.litellm.ai/docs/proxy_server#tutorial---using-with-aider
once local host is running, set the following on your aider.conf.yml.
openai-api-key:(azure key)
openai-api-base: http://<IP_ADDRESS>:8000
model: azure/(your deployment name)
in openai.py, append this code:

(the 'gpt4-32-0613' is the name of my deployment)

in openai.py, modify this code:

5. in tiktoken/model.py, add the encoding of your deployment:

6. tokens will now be 32k:

Hey @adminailab you could have just done this in 1 line:
litellm --model azure/gpt4-32-0613 --max_tokens 32000

now the server will always just call your deployment and pass it this max token number
was this unclear? or am i missing something?

Hello @krrishdholakia ,
I tried to do follow the instructions,
spin up the local server:
litellm --model azure/gpt4-32k-0613 --max_tokens 3200

test if workering:
litellm --test

...
LiteLLM: streaming response from proxy {
  "choices": [
    {
      "content_filter_results": {},
      "delta": {},
      "finish_reason": "stop",
      "index": 0
    }
  ],
  "created":<PHONE_NUMBER>,
  "id": "chatcmpl-8HC9tzzGnnhGzx70JCsuUE2FoIxzT",
  "model": "gpt-4-32k",
  "object": "chat.completion.chunk",
  "usage": null
}

on aider run this:
aider --openai-api-base http://<IP_ADDRESS>:8000 --openai-api-key fake-key

this is the result of aider:
Aider v0.16.3
Setting openai.api_base=http://<IP_ADDRESS>:8000
API key supports: azure/gpt4-32k-0613
API key does not support gpt-4, falling back to gpt-3.5-turbo-16k
Model: gpt-3.5-turbo-16k
Git repo: .git
Repo-map: using 1024 tokens
Use /help to see in-chat commands, run with --help to see cmd line args

This was the reason why I modified the code a bit to let it recognize that my azure/gpt4 is a gpt4 model.
Am I missing a step? Appreciate the response

Deepseek Coder 33B providing me with the best local results so far. The 6.7B was useless.
Using llama.cpp (latest git version needed):
Llama server (localhost:8080):
./server -t 16 -m deepseek-coder-33b-instruct.Q4_K_S.gguf -a gpt-4 -c 16384 --timeout 30 -ngl 65
I actually used a 6120 context size rather than 16384 due to VRAM limitations, but up to 16384 should work. Using 16 threads because I have a 16 core, reduce to your setup, not sure those are really relevant as I'm offloading the entire model to the GPU here.
Llama to OpenAI proxy server (from examples/server subdirectory of your llama.cpp install) (localhost:8081)
python api_like_OAI.py --chat-prompt "You are an AI programming assistant, utilizing the Deepseek Coder model, developed by Deepseek Company, and you only answer questions related to computer science. For politically sensitive questions, security and privacy issues, and other non-computer science questions, you will refuse to answer.\n" --user-name "\n### Instruction:\n" --ai-name "\n### Response:\n" --system-name "\n"
Aider benchmark (in docker so not using localhost):
OPENAI_API_BASE=http://<IP_ADDRESS>:8081/v1 OPENAI_KEY=dummy python3.10 benchmark/benchmark.py "$NAME_BENCHMARK" --new --clean --threads 1 --edit-format whole --verbose
test-cases: 134
model: gpt-3.5-turbo
edit_format: whole
commit_hash: 93184d1
num_error_outputs: 1
num_user_asks: 1
num_exhausted_context_windows 0
test_timeouts: 4

43.3% correct after try 0
52.2% correct after try 1

duration: 31.8 sec/test-case

Hmm, in a rather bizarre turn of events, the Q8 version of deepseek-coder-33b is returning lower scores than the Q4_K_S version I mentioned above, while by all expectations it should be better. Tests run on an M1 Max.
deepseek-coder-33b-instruct.Q8_0.gguf
test-cases: 134
model: gpt-3.5-turbo
edit_format: whole
commit_hash: 93184d1
num_error_outputs: 3
num_user_asks: 3
num_exhausted_context_windows 0
test_timeouts: 4

38.8% correct after try 0
44.8% correct after try 1

I've only been focusing on the benchmarks. I've seen that Aider error from the benchmark too, it happens if llama.cpp is still thinking about the answer. The benchmark repeats the request until it is filled though. I have not seen that proxy error, but it is entirely possible a proxy needs to be adapted for Aider use. I'm not sure if oobabooga has been updated yet with a new enough llama.cpp for it to function, but it does provide it's own OpenAI API you could use instead of the proxy.

deepseek-coder-33b-instruct.Q6_K.gguf
model: gpt-3.5-turbo
edit_format: whole
commit_hash: 93184d1
num_error_outputs: 6
num_user_asks: 6
num_exhausted_context_windows 0
test_timeouts: 1

39.6% correct after try 0
45.5% correct after try 1```

Q4 >> Q6 >> Q8. This is the wrong way around. No idea what's causing this, perhaps prompt related?

Here are the Benchmark results for deepseek-coder-6.7b-instruct.Q8_0.gguf run on my Tesla P4 GPU
─── /benchmarks/2023-11-15-10-42-27--deepseek-coder-6.7b-instruct.Q8_0.gguf ────
test-cases: 135
model: gpt-3.5-turbo-16k
edit_format: whole
commit_hash: f6aa09c-dirty
num_error_outputs: 10
num_user_asks: 10
num_exhausted_context_windows 0
test_timeouts: 7
31.9% correct after try 0
37.0% correct after try 1
duration: 719.2 sec/test-case
costs: $0.0106/test-case, $1.43 total, $1.43 projected
────────────────────────────────────────────────────────────────────────────────

did anyone run the base gpt3.5 benchmark? Also gpt 4 and gpt 4 turbo benchmarks would be great as well

did anyone run the base gpt3.5 benchmark? Also gpt 4 and gpt 4 turbo benchmarks would be great as well

Nevermind, just saw https://aider.chat/docs/benchmarks.html. Good to see open llms competing with openais capabilities in aider, looking forward to a more comprehensive setup once the kinks are worked out, gl with the research

The prompt seems to need adjustment for deepseek

Here is the latest Benchmark I have run which seems to indicate that Magicoder is a little better than Deepseek-coder
───────────── /benchmarks/2024-01-02-11-52-14--Magicoder-S-DS-6.7B ─────────────
test-cases: 135
model: gpt-3.5-turbo-16k
edit_format: whole
commit_hash: 93184d1-dirty
num_error_outputs: 0
num_user_asks: 0
num_exhausted_context_windows 0
test_timeouts: 3
34.1% correct after try 0
37.8% correct after try 1
duration: 25.5 sec/test-case
costs: $0.0073/test-case, $0.98 total, $0.98 projected

Deepseek-ai has released a new version of Deepseek Coder
Here is my benchmark of it using LoneStriker/deepseek-coder-7b-instruct-v1.5-GGUF and run on my Tesla P4 GPU
──── /benchmarks/2024-01-28-17-19-17--deepseek-coder-7b-instruct-v1.5_8bit ─────
test-cases: 135
model: gpt-3.5-turbo-16k
edit_format: whole
commit_hash: 93184d1-dirty
num_error_outputs: 0
num_user_asks: 0
num_exhausted_context_windows 0
test_timeouts: 3
37.0% correct after try 0
43.7% correct after try 1
duration: 361.8 sec/test-case
costs: $0.0079/test-case, $1.07 total, $1.07 projected
────────────────────────────────────────────────────────────────────────────────

@apcameron nice - that's starting to look respectable for a 7b model

So I don't get this, if a serverless endpoint uses the openai API library then it should be easy to add to Aider right? Prompting issues aside that is. So for example together.ai have about 90 OS models in their service at the moment. Including the Raven model for function calling. So I'm not sure what is meant by the 'prompts' being an issue. Clearly I'm either half asleep these days or age is catching up with me? What am I missing?
Ohh sorry heres the together.ai list of models, I think they hand out 25 bucks to new accounts (don't quote me on that , just that I got $25 when I signed up I assume its everyone) and are after all at least 5 times cheaper than OpenAI to begin with.
So whats the 'prompting' issue?

I couldn't find any documentation on how to plug local LLMs in the FAQ, the following line as suggested on this thread by @adminailab worked for me:
aider --openai-api-base http://<IP_ADDRESS>:8000 --openai-api-key fake-key
(First download an LLM and run it locally using litellm)
Maybe this can be added to the FAQ? Or did I miss it?

yes, it works, thanks! but I have this whenever I ask for a longer task than a hello world:
The chat session is larger than the context window!
Approximate context window usage, in tokens:
$ 0.00      474 system messages
$ 0.00      360 chat history    use /clear to clear
$ 0.00        8 coco.cs         use /drop to drop from chat
$ 0.00       85 jaja.cs         use /drop to drop from chat
$ 0.00      927 tokens total
15,458 tokens remaining in context window
16,385 tokens max context window size
To reduce token usage:

Use /drop to remove unneeded files from the chat session.
Use /clear to clear chat history.

any thoughts about together.xyz connection? will be it useful as long as this is made for GPT4?
thank you for all!

ok, solved using Llama.cpp, neither Koboldcpp or text webui worked. Hope this helps!

How do I gert this working with litellm using their config file and ollama? I have litellm setup in docker with the following config:
model_list:
  #- model_name: mixtral
  #  litellm_params:
  #    model: ollama/mixtral:8x7b-instruct-v0.1-q5_K_M
  #    api_base: http://ollama:11434
  #    stream: True
  #- model_name: mistral
  #  litellm_params:
  #    model: ollama/mistral
  #    api_base: http://ollama:11434
  #    stream: True
  - model_name: deepseek-coder
    litellm_params:
      model: ollama/deepseek-coder:33b
      api_base: http://ollama:11434
      stream: True

and run the following aider command but get model not found error:
aider --openai-api-base=http://localhost:8000 --openai-api-key dummy --model gpt-3.5-turbo-16k

@paul-gauthier The recent introduction of the Claude 3 family of models from Anthropic, particularly 'claude-3-opus-20240229', is reported to achieve an 84.9% success rate on HumanEval 0 shot, which is a notable leap from GPT-4's 67% benchmark. Despite numerous claims from various companies about their models outshining GPT-4 in coding benchmarks, GPT-4 has maintained its lead in real-world applications for over a year now, even amidst the 'laziness' issue identified in the 1106 and later models, informally referred to as "GPT-4-Turbo".
Considering your recognized expertise and the trust you've earned with your public benchmark analyses—like when you challenged OpenAI's 'less lazy' narrative for the GPT-4-0125-preview—would you be open to evaluating the new Claude Model using your benchmark suite? I'm particularly interested in whether it can match or exceed GPT-4's zero-shot coding capabilities or its performance in chain of thought scenarios, as per your testing methodologies.
Your contributions to the community are highly valued, and I eagerly anticipate your potential review of this model. As far as I'm aware, no other model has managed to outperform GPT-4 in real-world Python performance tests. Your expert evaluation would be immensely beneficial. Thank you for considering this request.

Just passing through, and thought to add my 2c:

Interesting project, seems like it would be useable for security conscious companies if it supported private / open LLM's
Managed to get this "sort-of" working with Ollama using the codellama model, in a few minutes.
It's worth checking the network graph - there are forks that are adding features that would simplify adding additional LLMs. eg https://github.com/tastyblob/aider/commit/cdd8b36fd38f52009033ad1e7fbfdc8e44012b96
Seems like instructor could / should be utilised to do much of the heavy lifting.

/ 2c

Agree, instructor should be looked at.

just tried to get claude 3 to work, but no dice:
aider --4-turbo --openai-api-base https://openrouter.ai/api/v1 --openai-api-key sk-or-v1-xxxxxxxxxxxxxxxxxxx --model anthropic/claude-3-opus-20240229
it's throwing this valueerror:

nevermind, i see i had the wrong model name. it works with anthropic/claude-3-opus

I am working on Claude 3 support native in aider. But via openrouter it looks like you need --model anthropic/claude-3-opus.

@paul-gauthier Have you considered setting up GitHub Sponsors?

I, and likely others, would love to show support for the great work you're doing.
Stoked for Claude 3 support. My benchmarks show it beating GPT-4 by a nontrivial amount.

I agree, i get much better results with Claude 3, than you for your great work @paul-gauthier

I agree, i get much better results with Claude 3, than you for your great work @paul-gauthier

My initial findings show that its capabilities are at least comparable to those of GPT-4, with a similar level of correct code outputs. It also seems to have a lower tendency towards the 'lazy' factor and produces responses that nearly reach the maximum token limit. I believe that even if it is marginally less capable than GPT-4 overall, its enhanced attention mechanism, which covers all 200,000 tokens in the context window, could significantly outperform GPT-4's 128,000-token cross-attention mechanism when dealing with large code bases. The latter often creates hallucinations in context due to its less reliable recall.
Although I don't utilize Aider, I recognize its importance as a data source, and Paul's benchmarks have been illuminating regarding its real-world performance. For a project like Aider, the Claude 3 series of models could represent a substantial improvement, particularly in response formatting and having a much better context memory of the entire codebase. This advancement could be a significant step forward until, presumably, GPT-5 surpasses it with an even better attention mechanism for its context window.

The new claude-3-opus-20240229 model got the highest score ever on aider's benchmark, completing 68.4% of the tasks. While Opus got the highest score, it was only a few points higher than the GPT-4 Turbo results. Given the extra costs of Opus and the slower response times, it remains to be seen which is the most practical model for daily coding use.
https://aider.chat/2024/03/08/claude-3.html

I am working on Claude 3 support native in aider. But via openrouter it looks like you need --model anthropic/claude-3-opus.

Looking forward to native support. I'm already paying Anthropic for Claude. I would like to avoid paying OpenRouter as well.

Is there a tldr; for this thread? I'd love to use Aider with a local LLM for coding, either through LMstudio or directly. I'm able to put a bit of work into making it work, but would prefer not to spend days on it. What would anyone recommend? I'm on a 64gb Mac Studio btw with a full LAMP stack.

openhermes-2.5-mistral-7b-16k.Q8_0.gguf kind of working. But it does not provide filename as requested. what I understood: ChatML should be supported by model. So it is models like Dolphin and Open*

Just passing through, and thought to add my 2c:

Interesting project, seems like it would be useable for security conscious companies if it supported private / open LLM's
Managed to get this "sort-of" working with Ollama using the codellama model, in a few minutes.
It's worth checking the network graph - there are forks that are adding features that would simplify adding additional LLMs. eg tastyblob@cdd8b36
Seems like instructor could / should be utilised to do much of the heavy lifting.

/ 2c

@macropin What was your aider syntax for using local model via ollama ? I am trying to run aider with codellama via ollama, but lost at mentioning the model name while invoking aider in cli. I have this so far:
aider --openai-api-base http://localhost:11434 --openai-api-key fake-key --model <?>
What am I missing? Thanks in advance

Accessing claude-3-opus-20240229 through LiteLLM doesn't seem to work right.
$ aider --openai-api-base "http://<IP_ADDRESS>:4000" --edit-format diff
Aider v0.27.0
API key supports: anthropic/claude-3-opus-20240229
API key does not support gpt-4-1106-preview, falling back to gpt-3.5-turbo-0125

$ aider --openai-api-base "http://<IP_ADDRESS>:4000" --model anthropic/claude-3-opus-20240229 --edit-format diff
Aider v0.27.0
Traceback (most recent call last):
  File "/Users/cosmoguerini/micromamba/envs/cosmosis/lib/python3.12/site-packages/aider/models/openai.py", line 124, in __init__
    self.tokenizer = tiktoken.encoding_for_model(true_name)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/cosmo/micromamba/envs/cosmosis/lib/python3.12/site-packages/tiktoken/model.py", line 101, in encoding_for_model
    return get_encoding(encoding_name_for_model(model_name))
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/cosmo/micromamba/envs/cosmosis/lib/python3.12/site-packages/tiktoken/model.py", line 88, in encoding_name_for_model
    raise KeyError(
KeyError: 'Could not automatically map anthropic/claude-3-opus-20240229 to a tokeniser. Please use `tiktoken.get_encoding` to explicitly get the tokeniser you expect.'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/cosmo/micromamba/envs/cosmosis/bin/aider", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/cosmo/micromamba/envs/cosmosis/lib/python3.12/site-packages/aider/main.py", line 592, in main
    main_model = models.Model.create(args.model, client)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/cosmo/micromamba/envs/cosmosis/lib/python3.12/site-packages/aider/models/model.py", line 28, in create
    return OpenAIModel(name)
           ^^^^^^^^^^^^^^^^^
  File "/Users/cosmo/micromamba/envs/cosmosis/lib/python3.12/site-packages/aider/models/openai.py", line 126, in __init__
    raise ValueError(f"No known tokenizer for model: {name}")
ValueError: No known tokenizer for model: anthropic/claude-3-opus-20240229

hey @cosmojg the error looks like it's being caused by aider using tiktoken
why not set the model name as gpt-3.5-turbo on aider
and let litellm proxy handle the translation
litellm --model anthropic/claude-3-opus-20240229

You can call it any model on aider, and it'll automatically translate it to anthropic claude 3 for you

@paul-gauthier
https://github.com/leona/helix-gpt/blob/master/src/providers/github.ts
This add-on lets you use copilot-x's chat feature within helix editor.
I think copilot chat uses gpt-4 under the hood as the github.ts file contains
model: "gpt-4",
If this could be added to aider then we would be able to do unlimited calls to the API for the fixed cost of the github copilot x subscription.

@paul-gauthier
https://github.com/leona/helix-gpt/blob/master/src/providers/github.ts
This add-on lets you use copilot-x's chat feature within helix editor.
I think copilot chat uses gpt-4 under the hood as the github.ts file contains
model: "gpt-4",

If this could be added to aider then we would be able to do unlimited calls to the API for the fixed cost of the github copilot x subscription.

Wow! I'm already paying for this but prefer to use aider. The main reason I don't use aider more is because of the cost using OpenAI gpt-4 tokens. This would let us legit use copilot. Mind blown.

@krrishdholakia Wow, thanks! Hilariously, you made me realize that I was having a bit of a brainfart. I had already tried setting the model to gpt-3.5-turbo, saw that it worked, but worried that the --model flag would override the --edit-format flag and force the use of aider's wholefile prompts instead of the udiff or editblock prompts. Your reply inspired me to go and try it again, and I only now just noticed the line confirming the use of the specified format: Model: gpt-3.5-turbo using diff edit format

One straightforward way to support a wide range of LLMs might be to support OpenRouter   ( https://openrouter.ai/)

One straightforward way to support a wide range of LLMs might be to support OpenRouter ( https://openrouter.ai/)

aider supports openrouter. has been doing so for quite sometime.

Sorry just started using aider. Its docs just asked for OPENAI_API_KEY. So assumed it just supported openai.

@krrishdholakia Alas, it seems that running aider with --model "gpt-3.5-turbo fails to properly generate a working repomap for Claude to reference. Fortunately, I've come up with a better workaround (at least until Claude is officially supported).
After installing aider with pip, navigate to the directory in which it was installed, and edit the openai_aliases dictionary on line 108 of ../site-packages/aider/models/openai.py like so:
Before:
https://github.com/paul-gauthier/aider/blob/3ab49f1df351d947d76d5e333326f9fd416e5f20/aider/models/openai.py#L108-L116
After:
openai_aliases = {
    # claude-3-opus
    "anthropic/claude-3-opus-20240229": "gpt-4-vision-preview",
    # gpt-3.5
    "gpt-3.5-turbo": "gpt-3.5-turbo-0613",
    "gpt-3.5-turbo-16k": "gpt-3.5-turbo-16k-0613",
    # gpt-4
    "gpt-4-turbo-preview": "gpt-4-0125-preview",
    "gpt-4": "gpt-4-0613",
    "gpt-4-32k": "gpt-4-32k-0613",
}

After adding the above dictionary entry for Claude, you should be able to run the following without issue:
aider --openai-api-base "http://<IP_ADDRESS>:4000" --model "anthropic/claude-3-opus-20240229"
Not only will this result in a properly generated repomap, but it will also set sane defaults with regard to context size (i.e., ~100,000 tokens) and edit format (i.e., diff edit blocks). I haven't tested whether images work like they do with gpt-4-vision-preview, but in theory, if litellm can handle the API translation, I think they very well might.

Looking for testers
See https://github.com/paul-gauthier/aider/pull/549
This PR adds LiteLLM support. See the PR for more details.

Thank you @paul-gauthier for this. Is there a way to use AWS Bedrock deployed models with aider ?

@e-nouri not directly, unless Bedrock provides an openai compatible api?

Is it possible to have all the endpoints that are used from the openai api ? this is the openapi for openai :D https://raw.githubusercontent.com/openai/openai-openapi/master/openapi.yaml so many routes to implement on aws using aws services S3, Bedrock, etc. I am looking through the code meanwhile.

Yes, the latest version of aider connects to providers using litellm. So openai-compatible bedrock should work out of the box.
See aider's LLM docs here: https://aider.chat/docs/llms.html

FYI, I'm thinking about closing this issue. In the last couple of months there has been an explosion of much more capable models, both in the cloud and for local use. And Aider now has first class support for working with many of them as of v0.29.0.

I have been watching this issue over the last couple of month. IMHO litlelm is a bit of a hack. I would like to see direct support from ollama with some suggested models/prompts

Now that litellm and opus are working I'd say this could be closed as completed! Other models can be new issues.

agree with closing the issue, with ollama and litellm folks have got plenty of options for interfacing with local models and the work of making coders performant with individual models is too large and ongoing for one ticket.

hi @keesj would love feedback on this - any specific reason why you think litellm is not a good solution for your use-case?
Would love to improve here.
I am quite sure this is a personal preference and probably not the right issue to discuss but here we are. In my (few) experiments running litellm was this extra magic step I did to get things working but the  extra level of abstraction and OPENAI API combability and not on top of my list. I think I would not feel that way if litellm was integrated (e.g. was not running separately). I hope this helps.


feat: add menu for managing events and log out

First steps of #27
Manage events opens the organizer's app if it is installed or else opens up the organizer's app in playstore.
Shifted log out to menu.

PR updated. Please review

@nikit19 Please now focus on non auth features


Update input snippets to use destructuring syntax

Minor fixes that include the use of destructuring suggested by @skatcat31

😁


Add Steam groups more statistics / queries / filters on groups

Hello,
I don't know if missed this functionnality in ESGST, if yes please explain me quickly how to do ;).
Could you please add a new feature giving more statistics about Steam group through SteamGifts ?
For example I would like to easily know if some of groups I joined several years ago are still active : in one query I would like to see all my groups where no new GA where made since more than one year, in this query I want to exclude private groups and enable/disable some more criterias...
Perhaps add a group filter ?
I hope I'm not asking to much to you :) your extension is actually so awesome.
Thanks per advance for your answer.

I'll add that data to Group Stats (if you were unaware of this feature), and then I'll see how feasible it is to add filters to work with that feature.