[deleted by user]

      • FauxLiving@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        4 months ago

        AI Horde has a OpenAI compatible REST API (https://oai.aihorde.net/). They say that it doesn’t support the full feature set of their native API, but will almost assuredly work with this.

        OP manually builds the oapi JSON payload and then uses the python requests library to handle the request.

        The fields they’re using match the documentation on https://oai.aihorde.net/docs

        You would need to add a header with your AI Horde API key. Looks like that would only need to be done in router_fastapi.py - call_model_prompt() (line 269) and call_model_messages() (line 303) and then everything else is setup according to documentation

          • db0@lemmy.dbzer0.com
            link
            fedilink
            arrow-up
            0
            ·
            4 months ago

            Very impressive. The only mistake on the third one is that the kudos are actually transferrable (i.e. “tradable”), but we forbid exchanges for monetary rewards.

            Disclaimer: I’m the lead developer for the AI Horde. I also like you’ve achieved here and would be interesting if we can promote this usage via the AI Horde in some way. If you can think of some integration or collaboration we could do, hit me up!

            PS: While the OpenAI API is technically working, we still prefer people to use our own API as it’s much more powerful (allowing people to use multiple models, filter workers, tweak more vars) and so on. If you would support our native API, I’d be happy to add a link to your software in our frontpage in the integrations area for LLMs.