Skip to content

armgit / burr

Public Imported from GitHub
0

Build applications that make decisions (chatbots, agents, simulations, etc...). Monitor, trace, persist, and execute on your own infrastructure.

Fixes up chatbot server to work on install

elijahbenizzya3fe9052e2b3
diff --git a/MANIFEST.in b/MANIFEST.in
index e1909816..603b6f75 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,2 +1,3 @@
recursive-include burr/tracking/server/demo_data *
recursive-include burr/tracking/server/build *
+recursive-include examples/ *
diff --git a/burr/examples b/burr/examples
new file mode 120000
index 00000000..a6573af9
--- /dev/null
+++ b/burr/examples
@@ -0,0 +1 @@
+../examples
\ No newline at end of file
diff --git a/burr/tracking/server/examples/chatbot.py b/burr/tracking/server/examples/chatbot.py
index 54bcb630..65efabf0 100644
--- a/burr/tracking/server/examples/chatbot.py
+++ b/burr/tracking/server/examples/chatbot.py
@@ -6,10 +6,9 @@ from fastapi import FastAPI
from starlette.requests import Request
from burr.core import Application, State
+from burr.examples.gpt import application as chat_application
from burr.tracking import LocalTrackingClient
-from examples.gpt import application as chat_application
-
class ChatItem(pydantic.BaseModel):
content: str
diff --git a/examples/gpt/application.py b/examples/gpt/application.py
index 2532923b..379f4725 100644
--- a/examples/gpt/application.py
+++ b/examples/gpt/application.py
@@ -2,7 +2,6 @@ import copy
import os
from typing import List, Optional, Tuple
-import dag
import openai
from hamilton import driver
@@ -195,6 +194,8 @@ def base_application(
def hamilton_application(
hooks: List[LifecycleAdapter], app_id: str, storage_dir: str, project_id: str
):
+ import dag
+
dr = driver.Driver({"provider": "openai"}, dag) # TODO -- add modules
Hamilton.set_driver(dr)
application = (
diff --git a/pyproject.toml b/pyproject.toml
index 424011ab..0e1294f1 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -64,6 +64,7 @@ tracking-server = [
"aiofiles",
"requests",
"jinja2",
+ "openai", # temporary for the demo, we will likely remove
]
tracking = [