Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run this in notebook #554

Open
ahuang11 opened this issue May 14, 2024 · 0 comments
Open

Cannot run this in notebook #554

ahuang11 opened this issue May 14, 2024 · 0 comments

Comments

@ahuang11
Copy link
Contributor

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={
        "windturbines": "SELECT * from read_parquet('windturbines.parq')",
    },
    uri=":memory",
    initializers=["INSTALL httpfs;", "LOAD httpfs;"],
)

assistant = lmai.Assistant(
    llm=llm,
    agents=[
        lmai.agents.TableAgent,
        lmai.agents.SQLAgent,
        lmai.agents.PipelineAgent,
        lmai.agents.hvPlotAgent,
        lmai.agents.ChatAgent,
    ],
)
assistant.servable("Lumen.ai")
assistant.controls().servable(area="sidebar")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant