I just set up a new dedicated AI server that is quite fast by my standards. I have it running with OpenWebUI and would like to integrate it with other services. I think it would be cool to have something like copilot where I can be writing code in a text editor and have it add a readme function or something like that. I have also used some RAG stuff and like it, but I think it would be cool to have a RAG that can access live data, like having the most up to date docker compose file and nginx configs for when I ask it about server stuff. So, what are you integrating your AI stuff with, and how can I get started?

  • SmokeyDope@lemmy.worldM
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    5 days ago

    VSCode + roo plugin seems to be all the hotness for coders leveraging ‘agenic teams’ so I spent a bit playing around with it. Most local models dont do tool calling very well I need to see if devstral works better without giving errors. I hear real professionals use claude API for that kind of stuff.

    Im only vaguely familiar with getting computers to send, recieve, and manipulate data with eachother on a local network so got a very basic python script going pointed at kobold cpps openai-compatable API to send prompts and recieve repliesinstead of the default webui app just to learn how it works under the hood.

    One of my next projects will be creating a extremely simple web based UI for my ereaders basic web browser to connect to. kobold has something similar with the /noscript subpage but even that is too much for my kobo reader. I intend to somehow leverage a gemtext to html proxy like ducking or newswaffle to make the page rendering output dead simple.

    One of these days im going to get a pi zero and attach it to a relay and see if I can get a model to send a signal to turn a light on and off. Those home automation people with the smart houses that integrate llms into things look soo cool

    • HumanPerson@sh.itjust.worksOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      4 days ago

      I looked into roo, and was able to get it to interact with ollama but not actually work. From looking into roo, I found Cline which works a lot better. I would like to figure out a way to get it to work with the authenticated proxy api hosted to openwebui so I can access models externally but it is still pretty cool.

      • SmokeyDope@lemmy.worldM
        link
        fedilink
        English
        arrow-up
        0
        ·
        edit-2
        4 days ago

        If your running into the issue of an app wanting an api key for your local ollamas openai-compatable web interface API and refuses to work without one, I found that any random characters work. If you port forward your host computer you should be able to access the webui interface on an external network using the public IP.

        Heres the dead simple python program I used to send and recieve text to kobold.cpp engine through the web API. Not sure how similar ollama but afaik openai-compatable API means it all should works close to the same for compatibility(I think? lol!) if you give it a shot Make sure to set the .py file you make as executable and run it from a terminal doing ./filename.py to see the output in real time. It should make a log text file in same dir as the program too. Just use your host computers local ip if the python script pc is on same network.

        spoiler
        import requests
        
        # Configuration
        API_URL = "http://10.0.0.xx:5001/api/v1/generate"
        PROMPT = "Tell me a short story about a robot learning to dance."
        OUTPUT_FILE = "output.txt"
        
        # Define the API request data
        data = {
            "prompt": PROMPT,
            "max_length": 200,      # Adjust response length
            "temperature": 0.7,     # Control randomness (0=deterministic, 1=creative)
            "top_p": 0.9,           # Focus on high-probability tokens
        }
        
        # Send the request to kobold.cpp
        response = requests.post(API_URL, json=data)
        
        if response.status_code == 200:
            # Extract the generated text
            result = response.json()
            generated_text = result["results"][0]["text"]
            
            # Save to a text file
            with open(OUTPUT_FILE, "w") as f:
                f.write(generated_text)
            print(f"Response saved to {OUTPUT_FILE}!")
        else:
            print(f"Error: {response.status_code} - {response.text}")