integrate Deepseek to Autolisp / Visuallisp

jtm2020hyo
edited April 22 in LISP

Is there any method to integrate bricscad visuallisp with deepseek locally offline?

Comments

  • Check your other post on another forum.

  • I was expectations to control BricsCAD since DeepSeek
  • Its_Alive
    edited May 16
    I goofed with this more after my last post, here’s better code

    from pyrx import Rx, Ge, Gi, Gs, Db, Ap, Ed, Ax, Brx
    import traceback

    from ollama import chat
    from ollama import ChatResponse


    @Ap.Command()
    def doit():
        try:
            ps, cmd = Ed.Editor.getString(1, "By your command: ")
            if ps != Ed.PromptStatus.eOk:
                raise RuntimeError("Oops! {}: ".format(ps))

            response: ChatResponse = chat(
                model="gemma2",
                messages=[
                    {
                        "role": "user",
                        "content": cmd,
                    },
                ],
            )
            print(response.message.content)
        except Exception as err:
            traceback.print_exception(err)

  • You can ask it to write lisps for you
    : DOIT
    By your command: write an autolisp routine to draw a circle
    ```lisp
    (defun c:circle (/ center_pt radius)
      ;; Get the center point of the circle.
      (setq center_pt (getpoint "\nEnter center point: "))

      ;; Get the radius of the circle.
      (setq radius (getreal "\nEnter radius: "))

      ;; Draw the circle.
      (command "CIRCLE" center_pt radius)
      (princ)
    )
    ```




  • I think if you work for a company and are able to run a larger model, it might be useful.  Full Deep seek is 400 – 1.3TB depending on the model deepseek-r1:14b takes a couple minutes to respond, though my system is a bit old

    : DOIT
    By your command: what is your name
    Greetings! I'm DeepSeek-R1, an artificial intelligence assistant created by DeepSeek. I'm at your service and would be delighted to assist you with any inquiries or tasks you may have.
    have fun

  • I just stumbled over a video of somebody using Blender through a LLM (the person is suggesting QWEN3 + OTERM for local use) application using MCP. Absolutely nerdy. I can see the LLM studying the national norms for design output...
  • Its_Alive
    edited May 18

    “Absolutely nerdy”

    Lol, I was just pondering if a LLM could read/write/generate DXFs. Google’s AI says it can. I can see file formats moving from binary, to something like a zipped up JSON format LLMs could be trained on