holoviz / lumen

Illuminate your data.
https://lumen.holoviz.org
BSD 3-Clause "New" or "Revised" License
177 stars 19 forks source link

Lumen ai dependencies (or suggesstions) #583

Closed droumis closed 3 months ago

droumis commented 3 months ago

To run the code below, I needed to also install:

import pathlib

import lumen as lm
import lumen.ai as lmai
import panel as pn

from lumen.sources.duckdb import DuckDBSource

pn.extension("tabulator", "codeeditor", inline=False, template="fast")

llm = lmai.llm.OpenAI()

lmai.memory["current_source"] = DuckDBSource(
    tables=["read_parquet('windturbines.parq')"],
    uri=":memory:",
    initializers=["INSTALL httpfs;", "LOAD httpfs;"],
)

assistant = lmai.Assistant(
    llm=llm,
    agents=[
        lmai.agents.SourceAgent,
        lmai.agents.TableAgent,
        lmai.agents.TableListAgent,
        lmai.agents.SQLAgent,
        lmai.agents.PipelineAgent,
        lmai.agents.hvPlotAgent,
        lmai.agents.ChatAgent,
    ],
)
assistant.servable("Lumen.ai")
assistant.controls().servable(area="sidebar")

github-actions[bot] commented 1 week ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.