AutoGen Studio with 100% Local LLMs (LM Studio)

Поділитися
Вставка
  • Опубліковано 10 чер 2024
  • Learn how to run AutoGen Studio UI with local LLMs as agents.
    🦾 Discord: / discord
    ☕ Buy me a Coffee: ko-fi.com/promptengineering
    |🔴 Patreon: / promptengineering
    💼Consulting: calendly.com/engineerprompt/c...
    📧 Business Contact: engineerprompt@gmail.com
    Become Member: tinyurl.com/y5h28s6h
    💻 Pre-configured localGPT VM: bit.ly/localGPT (use Code: PromptEngineering for 50% off).
    LINKS:
    AutoGen UI: microsoft.github.io/autogen/b...
    LM Studio: lmstudio.ai/
    TIMESTAMPS:
    [00:00] Introduction
    [00:26] Setting Up LM Studio for Local LLMs
    [00:54] Downloading and Running an Instance of LM Studio
    [01:50] Serving the Model through an API Endpoint
    [02:48] Starting an Instance of AutoGen Studio
    [03:26] Creating Agents and Workflows in AutoGen Studio
    [06:30] Testing the Workflow in the Playground
    [07:35] Analyzing the Results and Issues
  • Наука та технологія

КОМЕНТАРІ • 110

  • @engineerprompt
    @engineerprompt  10 днів тому

    If you are interested in learning more about how to build robust RAG applications, check out this course: prompt-s-site.thinkific.com/courses/rag

  • @haroldasraz
    @haroldasraz 4 місяці тому +1

    This is so amazing how much the tech progressed in just a couple of months. Thank you for making this video.

  • @USBEN.
    @USBEN. 4 місяці тому +7

    Great first step, now i would like to see practical workflows that can be used for actual tasks. Hope to see videos on that.

  • @Dr_Tripper
    @Dr_Tripper 4 місяці тому

    I was missing one point in getting this working right yesterday, thanks.

  • @CelesteOnYoutube
    @CelesteOnYoutube 4 місяці тому +1

    OMG lm studio is just great. This makes thing so simple. thanks for the great video.

  • @prestonmccauley43
    @prestonmccauley43 4 місяці тому +4

    For those having issues, make sure you create each item from scratch again and add not-needed to the API key on all local calls; this should fix you up. I tried to modify it after and it failed,

  • @engineerprompt
    @engineerprompt  4 місяці тому +12

    If you run into issues with API key, just add: "not-needed" as the API key.

    • @ssvfx.
      @ssvfx. 4 місяці тому +3

      got it working from the default pip install autogenstudio with api key as either "" or NULL, I cant remember. it stopped working when i updated autogenstudio. "not-needed" doesnt seem to work either, so I'll try to rerun from scratch in the meantime

    • @nobo6687
      @nobo6687 4 місяці тому

      @@ssvfx.this isn’t solution I updated to and stopped to work ! How to run local LLM’S then ?

    • @ssvfx.
      @ssvfx. 4 місяці тому

      i just reinstalled the default autogenstudio version and didnt update @@nobo6687

    • @negadan77
      @negadan77 4 місяці тому +1

      Using "" in the API key field of the created local model... Works for me

    • @nobo6687
      @nobo6687 4 місяці тому

      @@negadan77 empty or literally : ””

  • @luigitech3169
    @luigitech3169 4 місяці тому +3

    Finally, thanks. I see a bright future for local LLM and agents

    • @jsmythib
      @jsmythib 4 місяці тому

      Immediately LARGE numbers of people want their own LLM's thumping away in the closet. :)

  • @danielshurman1061
    @danielshurman1061 4 місяці тому

    Very useful video on an important improvement in how we can use Open Source LLMs. More good progress your moves to document how to create a winning Local GPT

  • @nazihfattal974
    @nazihfattal974 4 місяці тому

    Good one. Thanks!
    Quick one: when you publish the workflow, it is supposedly publicly available. Is there a way to share the published workflow with others? Any possibility of making cosmetic changes to the UI?
    I been creating my own UI using streamlit with OpenAI assistant. a good journey to go through, but it would be faster to spin out more agents with a ready made UI.

  • @remco805
    @remco805 4 місяці тому

    Always the function calling.. but this is such an important fundamental building block.

  • @ecofriend93
    @ecofriend93 4 місяці тому

    very cool! thank you!

  • @Echo11days
    @Echo11days 4 місяці тому

    Yessssssssssssss this what i was waiting for.

  • @javi_park
    @javi_park 4 місяці тому +1

    great video, ty! this tool becomes super powerful if it understands the codebase and executes / writes codes on your behalf. do you know of any tools that do this yet?

  • @user-di2ld5wd4k
    @user-di2ld5wd4k 4 місяці тому +2

    I am getting this error: Error occurred while processing message: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable

  • @cashmoneybanks8442
    @cashmoneybanks8442 4 місяці тому +1

    I tried mistral and noticed some strange behavior. By default, the system message tells it to type TERMINATE if the task is completed. This caused it to terminate early before it successfully saved the image. If I removed this line from the system prompt, it worked, but it then continued to just print("Task completed successfully") over and over until it hit the message cap.

  • @rgm4646
    @rgm4646 4 місяці тому +1

    I get this error "title":"'messages' array must only contain objects with a 'content' field that is not empty". I have tried several different models.

  • @dipteshbosedb
    @dipteshbosedb 4 місяці тому +1

    Awesome video, exciting indeed. Looking forward to many more use cases.

  • @tijendersingh5363
    @tijendersingh5363 4 місяці тому

    how to intergrate open interpertor and llava. or how can we run open interpreter without using gpt 4 vision instead using local models by lm studio

  • @deciopenna
    @deciopenna 2 місяці тому

    Can't get past the The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable" error. Tried NULL, EMPTY, "", not-needed... nothing works.

  •  2 місяці тому +1

    for me it generates only first word of response for each of 13 responses in one blow. I tried to search for the solution, but it feels like I am the only one with this problem.
    When I connect to openAI, it works perfectly. only local LM studio has this problem. But LM studio itself works normally when I connect it to SillyTawern. Or even Autogen test runs OK. Only when it comes to run workflow in playground, it has this problem. In console of LMM studio it looks like it starts to response and immediately closes it and starts again and closes it... I tried every combination of LM studio server settings. Does anyone has any suggestions please?

  • @thegooddoctor6719
    @thegooddoctor6719 4 місяці тому

    Brilliant as usual. One major thing about using LM studio - Its Painfully slow using it as an agent (Verbose Logging seems one of the bottle necks), even on my i9 13900K/64gb/4090 system. Even though AutoGen Studio seems more polished, I'm thinking that Crew with Olama is more performant when using local LLMs.......

    • @engineerprompt
      @engineerprompt  4 місяці тому

      That's an interesting observation. Isn't there an option to turn off the verbose? Also might be interesting to see what they are using in the background for inference.

    • @yorkie4k
      @yorkie4k 4 місяці тому

      @@engineerprompt LMStudio uses llama.cpp as it's backend.

  • @alx8439
    @alx8439 4 місяці тому +12

    So after playing for several days with it I can firmly say - this whole shit (both autogen and it's UI) is long miles away from being useful for anything rather than very small things. Don't fool yourself guys, try it out with your own hands. Probably with gpt-4 it can do bit more, but with Mixtral-8x7B it's very limited in what it can do and it's very buggy.

  • @crepusculoooo
    @crepusculoooo 4 місяці тому

    which open source model can we use to do functions calling¡? i got 3060 12gb and 32gb ram

  • @attiladeri4817
    @attiladeri4817 2 місяці тому

    Hi, i did everything as per the video but I have got back the result like a converstion between the userproxy and the primary agent i.e.:
    my original prompt: userproxy: how r u?
    primary_assistanet: I'
    userproxy: am good
    primary_assistant: Glad
    userproxy: to hear.
    and after 12 messages the repsonse is cut
    How can i solve this issue? Thank you for the help in advance

  • @MrMoonsilver
    @MrMoonsilver 4 місяці тому

    Hey, what about havin an OpenAI compatible API-Endpoint from Autogen-Studio? I'd love to use that API for my projects. Do you know if this is already possible?

  • @henrychien9177
    @henrychien9177 4 місяці тому +3

    [2024-01-17 13:55:47.798] [ERROR] [Server Error] {"title":"'messages' array must only contain objects with a 'content' field that is not empty"}
    how to solve this?
    is it because the system message of user is empty?

    • @cashmoneybanks8442
      @cashmoneybanks8442 4 місяці тому

      I'm getting this as well. Tried adding a system message and it didn't fix it

    • @foxxo6963
      @foxxo6963 4 місяці тому

      I got this as well (windows 11, AMD R7, RTX 3090), I solved it by toggling the "Cross-Origin-Resource-Sharing (CORS)" setting to ON in LM Studio on the Local Server page (under the server port), It warns that it is a security risk, so use it with caution.

    • @punishedproduct
      @punishedproduct 2 місяці тому

      Same

  • @Atonsha
    @Atonsha 4 місяці тому

    I did the same installation and used the same model. It wrote the same code but did not execute it. I'm running on windows.

  • @AmanBansil
    @AmanBansil 20 днів тому +1

    I tried Phi3 and Llama3...both of them generate no output. Agents keep saying gibberish.

  • @techblock7938
    @techblock7938 4 місяці тому +2

    Nice video.
    Be aware of the LM Studio licence.

    • @chrism3440
      @chrism3440 3 місяці тому

      Non-commercial?

    • @techblock7938
      @techblock7938 3 місяці тому

      @@chrism3440 Hm, for autogen I now see only MIT. Conda environment is not open source.

  • @new4uOnTV
    @new4uOnTV 2 місяці тому

    what is the most good llm for python code generation?

  • @avinashjain3191
    @avinashjain3191 4 місяці тому

    Great Video! Can you make another video using different LLM, & Show different use cases of it?

    • @engineerprompt
      @engineerprompt  4 місяці тому +1

      Yes, more is coming :)

    • @sayanosis
      @sayanosis 4 місяці тому

      Thank you so much for this. Could you also guide me how to use an LLM inference from TogetherAI to run Autogen?

  • @prestonmccauley43
    @prestonmccauley43 4 місяці тому

    Lm studio is the best tool I use it for everything.

    • @engineerprompt
      @engineerprompt  4 місяці тому

      I agree, its really good.

    • @alx8439
      @alx8439 4 місяці тому

      Jan is almost the same good and it's open source (means free of trojans and backdoors usually associated with proprietary software)

  • @henrychien9177
    @henrychien9177 4 місяці тому

    how to solve
    Error occurred while processing message: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable

    • @henrychien9177
      @henrychien9177 4 місяці тому

      i tried the not-needed in api key but same issue

    • @engineerprompt
      @engineerprompt  4 місяці тому

      make sure you start with a completely new workflow and add quotes "" around not-needed. Hope this helps.

  • @jayr7741
    @jayr7741 4 місяці тому +1

    I'm interested in using AI to analyze trends and difficulty levels in UPSC exam questions. Can you share more details on how well AI can currently handle this task and any considerations I should be aware of?

    • @prestonmccauley43
      @prestonmccauley43 4 місяці тому

      You past likely want to look at something like bigquery ml for this. Depending on the total size of your dataset

    • @jayr7741
      @jayr7741 4 місяці тому

      @@prestonmccauley43 can you please help me with that ? Please

    • @PubgSpeed-wl8yo
      @PubgSpeed-wl8yo 4 місяці тому

      @@prestonmccauley43 What are the minimum computer specifications for connecting a large language model?

    • @prestonmccauley43
      @prestonmccauley43 4 місяці тому

      @@PubgSpeed-wl8yo - You really are going to need a colab for this most likely. You can probably explore it on at T4 GPU - which is free.

    • @PubgSpeed-wl8yo
      @PubgSpeed-wl8yo 4 місяці тому

      @@prestonmccauley43 So I'll be able to hook up to the colab llama? And then I can connect to autogen?

  • @Eddie.Growth
    @Eddie.Growth 4 місяці тому +1

    Doesnt work for me, using CodeLLM or any model i get the error Error occurred while processing message: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable

    • @Eddie.Growth
      @Eddie.Growth 4 місяці тому +1

      Fix for it, insert some fake api key

    • @brandonaso
      @brandonaso 4 місяці тому

      I have the same issue .

    • @engineerprompt
      @engineerprompt  4 місяці тому +1

      Add "not-needed" as the API key.

    • @mog22utube
      @mog22utube 4 місяці тому +1

      I received the same error while using GPT4 and now with the local LLM model. Anyone been able to resolve the issue?
      Great video, thanks!

    • @prestonmccauley43
      @prestonmccauley43 4 місяці тому

      Having the same issue and i used the server model on lm studio before, but something must not be saving when adding not-needed. Im attempting to rebuild workflow agent from scratch@@mog22utube

  • @JG27Korny
    @JG27Korny 4 місяці тому

    Auto-gen is fine-tuned for gpt API.

  • @greatsarmad5147
    @greatsarmad5147 4 місяці тому +1

    I did everything you did but I cant figure out wat is the issue i keep getting
    [Server Error] {"title":"'messages' array must only contain objects with a 'content' field that is not empty"}
    btw i am using windows not mac
    model openhermes 2 5 mistral 7B Q6_k gguf
    if anyone know pls help!

    • @christopherwilms
      @christopherwilms 4 місяці тому

      Me too; i'm on mac and same error; i did see a discussion on autogenstudio github where same has been reported and seems like they are looking into it

    • @christopherwilms
      @christopherwilms 4 місяці тому +1

      finally got it working; what i did different is enter something into every field i could, all the system messages, description fields, etc. the only thing i had to leave blank was model type, as putting something there threw an exception.

    • @greatsarmad5147
      @greatsarmad5147 4 місяці тому

      @@christopherwilms seems like it worked thanks! Issue now that it hallucinates as if it was "fear and loathing in Las Vegas"😂

    • @iokinpardoitxaso8836
      @iokinpardoitxaso8836 4 місяці тому

      Agree, just filling all system prompts solved the issue. Many thanks.@@christopherwilms

  • @watcanw8357
    @watcanw8357 4 місяці тому

    Is there an alternative for LM studio? it’s not compatible with my Intel Mac. Thanks for the great video!

    • @ghostofakina8747
      @ghostofakina8747 4 місяці тому +1

      Yep - Ditch the Mac ;)

    • @dandretube
      @dandretube 4 місяці тому

      There are alternative tutorials using ollama

    • @watcanw8357
      @watcanw8357 4 місяці тому +1

      @@dandretube thanks, got it figured out and it works great.

  • @nobodyislisting
    @nobodyislisting Місяць тому +1

    When I run local llm i get 2 word responses from both the user and the other agent.
    Like
    here is
    the script
    for the
    here is
    with each one talking back and forth like this? ANY IDEA? LMAO

  • @KolTregaskes
    @KolTregaskes 4 місяці тому

    I get to 6:52 after following your instructions precisely and get this message: "Error occurred while processing message: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable"
    I've checked and I have not referenced GPT-4 at all in the workflow. :-(

    • @KolTregaskes
      @KolTregaskes 4 місяці тому +2

      Ah, I needed to add "not-needed" as the API key. EDIT: but it still doesn't, display errors whatever I do, even if I type "Hello". :-(

    • @engineerprompt
      @engineerprompt  4 місяці тому +2

      In my case I ran into this when I was testing but it worked without it as well. Seems like there might be a bug. Thanks for pointing it out.

    • @GiovaDuarte
      @GiovaDuarte 4 місяці тому

      Were you able to figure this out? I am getting the same error.

    • @KolTregaskes
      @KolTregaskes 4 місяці тому +1

      @@GiovaDuarte See my reply above. Fixed the error but I didn't get much further. I gave up in the end.

  • @robertmazurowski5974
    @robertmazurowski5974 Місяць тому

    LM Studio doesn't seem to support function\tool calling even if the model is made for this. I am still experiemnting and researching this.

    • @engineerprompt
      @engineerprompt  Місяць тому

      that really useful info. I haven't looked at it but please let us know if you find something.

    • @robertmazurowski5974
      @robertmazurowski5974 Місяць тому

      ​@@engineerprompt Haven't found a solution yet, other than just using a "Please give me a json in this format" + pydantic object or Langchain ChatOpenAI + Output Parser.
      I managed to get my langchain code working by just setting the api base to the link of LM Studio, but their official tool binding mechanism doesn't work with LM Studio.
      I even tried a gorrila open functions v2 which is made for function calling, it doesn't work.
      BUT
      I checked fireworks AI cloud service. They hava llama 3 70b for 0.9 per Milion tokens which answers instantly and it supports the Open AI function calling (a feature added by fireworks AI) and even a complicated tasks response is immediate. This seems much better than gpt 3.5 while being 10 times cheaper than GPT4.
      They dumbed down GPT4 with the newest model anyway, it doesn't catch instrcutions like it used to in the last several weeks.
      Langchain has an integration with Fireworks AI so, it can be used with as a replacement for Open AI. I am not sure whether autogen is based on Langchain but if it is it should work.
      I was almost going to pull a trigger on a 3090 for running local models, but without proper function calling it is useless to me.

  • @realehu1463
    @realehu1463 22 дні тому

    why do my agents keep repeating themselves and never solve the problem?? user proxy and another assistant just keep going back and forth saying the same stuff to eachother and they never complete the task

  • @elwii04
    @elwii04 4 місяці тому

    When trying this I got an error inside of LM Studio saying: [ERROR] Unexpected endpoint or method. (POST /v1/chat/completions/chat/completions). Returning 200 anyway
    I have already tried changing the port but did not work...

    • @GabrielVeda
      @GabrielVeda 4 місяці тому

      That address looks wrong. chat/completions is doubled.

    • @cashmoneybanks8442
      @cashmoneybanks8442 4 місяці тому +1

      Remove "chat/completions" from the base url

    • @elwii04
      @elwii04 4 місяці тому

      @@cashmoneybanks8442 I did it like in the video. Only used v1 in the end

    • @elwii04
      @elwii04 4 місяці тому

      Its working for me with "localhost:0201/v1" where 0201 is the port i selected

  • @vicioustide
    @vicioustide 4 місяці тому

    How much does the openAI key costs to run all these chatgpt llms?

  • @hiteshmaurya9889
    @hiteshmaurya9889 4 місяці тому

    Now how can we run using gpu on google colab?

    • @engineerprompt
      @engineerprompt  4 місяці тому

      You will have to run the non GUI version.

  • @GAllium14
    @GAllium14 4 місяці тому +2

    Can you make a tutorial on running autogen through huggingface inference api for free??

  • @marcomeyer7545
    @marcomeyer7545 4 місяці тому

    Hi, how does licensing work if I build a web query app which uses the Gemini API to create a summary of the search results. If I use the free version of Gemini, and a web scraper, e.g. Serp API , and it returns a a json with the web content, and I send it to Gemini, they will use it for training. So what if I scrape by accident material that has not been authorized for AI training?

    • @engineerprompt
      @engineerprompt  4 місяці тому

      I am not sure. Probably you will need a legal advice here.

  • @dgfilms1712
    @dgfilms1712 4 місяці тому +1

    "not-needed" DOES NOT WORK

  • @eointolster
    @eointolster 4 місяці тому +1

    Content message error for me with mistral, going to try openhermes now. I'm personally sick of windows making such flawed stuff that runs perfect on Mac and rarely on windows

    • @CelesteOnYoutube
      @CelesteOnYoutube 4 місяці тому

      LOL I'm on windows and it works flawlessly. Maybe it's user error LOL

    • @Stranglewood
      @Stranglewood 4 місяці тому

      I have it running with the Bloke's mistral-7b-instruct-v0.1.Q4_K_M.gguf

  • @Paradoxical66
    @Paradoxical66 3 місяці тому

    Way too techy for the masses. Interface is very difficult.