### Install Example Dependencies Source: https://github.com/apache/burr/blob/main/examples/README.md Use this command to install the necessary dependencies for a specific example. Replace `` with the name of the example directory. ```bash pip install -r examples//requirements.txt ``` -------------------------------- ### Initialize and start the tracking UI Source: https://github.com/apache/burr/blob/main/docs/contributing/iterating.rst Commands to install dependencies and start the development server for the tracking UI. ```bash $ cd telemetry/ui $ npm install $ npm run start ``` -------------------------------- ### Install Dependencies Source: https://github.com/apache/burr/blob/main/examples/custom-serde/README.md Install the required Python packages for the custom serialization example. ```bash pip install -r requirements.txt ``` -------------------------------- ### Run Interactive RAG Example Source: https://github.com/apache/burr/blob/main/docs/getting_started/up-next.rst Install requirements and execute the conversational RAG example application. ```bash cd examples/conversational-rag/simple_example pip install -r requirements.txt python application.py ``` -------------------------------- ### Install Apache Burr and Jupyter Source: https://github.com/apache/burr/blob/main/examples/simple-chatbot-intro/README.md Install the necessary packages for Apache Burr and Jupyter to run the example. This command installs the 'start' extra for Apache Burr, which includes common dependencies for getting started. ```bash pip install "apache-burr[start]" jupyter ``` -------------------------------- ### Run Example Application Source: https://github.com/apache/burr/blob/main/examples/README.md Execute the main application script for a given example. Replace `` with the name of the example directory. ```bash python examples//application.py ``` -------------------------------- ### Install and Launch Burr UI Source: https://github.com/apache/burr/blob/main/docs/ui/getting-started.rst Install the necessary dependencies and start the tracking server on port 7241. ```bash pip install "apache-burr[start]" burr ``` -------------------------------- ### Clone and Run Hello World Example Source: https://github.com/apache/burr/blob/main/README.md Clone the repository and execute the counter example. ```bash git clone https://github.com/apache/burr && cd burr/examples/hello-world-counter python application.py ``` -------------------------------- ### Run Simple Counter Example Source: https://github.com/apache/burr/blob/main/docs/getting_started/up-next.rst Execute the hello-world-counter example application. ```bash cd examples/hello-world-counter python application.py ``` -------------------------------- ### Start Jupyter Notebook Source: https://github.com/apache/burr/blob/main/examples/conversational-rag/graph_db_example/README.md Installs Jupyter and starts a notebook server. Use this to access and run the ingest_notebook.ipynb or notebook.ipynb files. ```sh pip install jupyter jupyter notebook ``` -------------------------------- ### Install Dependencies Source: https://github.com/apache/burr/blob/main/examples/typed-state/notebook.ipynb Installs the necessary libraries for the example, including apache-burr with pydantic support, instructor, openai, and rich. ```python %pip install 'apache-burr[pydantic]' instructor openai rich ``` -------------------------------- ### Install Apache Burr Source: https://github.com/apache/burr/blob/main/examples/simple-chatbot-intro/notebook.ipynb Install the Apache Burr library with the 'start' extra to get started. This command ensures all necessary dependencies for basic functionality are included. ```bash !pip install "apache-burr[start]" ``` -------------------------------- ### Start the Burr UI Source: https://github.com/apache/burr/blob/main/docs/contributing/contributing.rst Navigates to the UI directory and starts the development server for the frontend. ```bash $ cd telemetry/ui $ npm run start ``` -------------------------------- ### Install Apache Burr Source: https://github.com/apache/burr/blob/main/examples/hello-world-counter/notebook.ipynb Installs the Apache Burr library with the 'start' extra, which includes necessary dependencies for getting started. ```python !pip install apache-burr[start] ``` -------------------------------- ### Install Burr and Dependencies Source: https://github.com/apache/burr/blob/main/examples/conversational-rag/simple_example/README.md Install Burr and its required dependencies for the conversational RAG example. Ensure you have a `requirements.txt` file. ```bash pip install "apache-burr[start]" -r requirements.txt ``` -------------------------------- ### Install Libraries for RAG Chatbot Source: https://github.com/apache/burr/blob/main/docs/examples/chatbots/rag-chatbot-hamilton.ipynb Installs the apache-burr, sf-hamilton, and openai libraries. Use this command to set up your environment before running the chatbot example. ```python !pip install apache-burr[start] sf-hamilton[visualization] openai ``` -------------------------------- ### Build from Scratch Source: https://github.com/apache/burr/blob/main/scripts/README.md Manual steps to build the UI, copy assets, handle examples, and build the wheel without using the automated release script. ```bash # 1. Build UI cd telemetry/ui npm install npm run build cd ../.. # 2. Copy UI build to the right place mkdir -p burr/tracking/server/build cp -a telemetry/ui/build/. burr/tracking/server/build/ # 3. Handle examples (replace symlink with actual files) rm burr/examples # Remove symlink mkdir burr/examples cp examples/__init__.py burr/examples/ cp -r examples/email-assistant burr/examples/ cp -r examples/multi-modal-chatbot burr/examples/ cp -r examples/streaming-fastapi burr/examples/ cp -r examples/deep-researcher burr/examples/ # 4. Build wheel flit build --format wheel # 5. Restore symlink rm -rf burr/examples ln -s ../examples burr/examples ``` -------------------------------- ### Install Burr and OpenTelemetry Source: https://github.com/apache/burr/blob/main/examples/opentelemetry/notebook.ipynb Installs the Apache Burr library with the 'start' extra and the OpenTelemetry instrumentation for OpenAI. Run this in a notebook environment. ```python %%capture !pip install "apache-burr[start]" !pip install opentelemetry-instrumentation-openai ``` -------------------------------- ### Install Burr and Run Chatbot Demo Source: https://github.com/apache/burr/blob/main/docs/getting_started/up-next.rst Install the necessary dependencies and launch the telemetry UI chatbot demo. ```bash pip install apache-burr[start] ``` ```bash burr-demo ``` -------------------------------- ### Install Build Dependencies and UI Assets Source: https://github.com/apache/burr/blob/main/scripts/README.md Commands to install necessary Python packages, verify GPG configuration, and build the telemetry UI. ```bash # Install build dependencies pip install flit pip install -e ".[cli]" # Installs burr-admin-build-ui command # Verify GPG setup gpg --list-secret-keys # Build UI assets (one-time or when UI changes) cd telemetry/ui && npm install && npm run build && cd ../.. ``` -------------------------------- ### Run the UI locally Source: https://github.com/apache/burr/blob/main/CONTRIBUTING.rst Starts the user interface development server. ```bash $ cd telemetry/ui $ npm run start ``` -------------------------------- ### Start the tracking server Source: https://github.com/apache/burr/blob/main/docs/contributing/iterating.rst Commands to launch the tracking server for development purposes. ```bash BURR_SERVE_STATIC=false burr-admin-server --no-open --dev-mode ``` ```bash BURR_SERVE_STATIC=false uvicorn burr.tracking.server.run:app --port 7241 --reload ``` -------------------------------- ### Install S3-backed Server and CLI Source: https://github.com/apache/burr/blob/main/burr/tracking/server/s3/README.md Installs the necessary packages for the S3-backed tracking server and the command-line interface. This command is useful for development and testing. ```bash pip install "apache-burr[tracking-server-s3, cli]" ``` -------------------------------- ### Run development server Source: https://github.com/apache/burr/blob/main/telemetry/ui/README.md Starts the application in development mode with hot module replacement enabled. ```bash npm start ``` -------------------------------- ### Running the Recursive Poem Generation Example Source: https://github.com/apache/burr/blob/main/examples/recursive/README.md This command sets the OpenAI API key and then executes the main Python script for the recursive application example. Ensure your API key is valid. ```bash export OPENAI_API_API_KEY=... python application.py ``` -------------------------------- ### Run Burr UI Server Source: https://github.com/apache/burr/blob/main/README.md Start the Burr telemetry UI server. ```bash burr ``` -------------------------------- ### Run the development server Source: https://github.com/apache/burr/blob/main/CONTRIBUTING.rst Starts the server in development mode on port 7241 without automatically opening the browser. ```bash $ burr --dev-mode --no-open # will run the server on port 7241 ``` -------------------------------- ### Build Model Action Source: https://github.com/apache/burr/blob/main/docs/examples/data-science/simulation.md Action to fit a model on the prepared data up to the simulation start date. Reads 'data' and 'simulation_start', writes 'model'. ```python @action(reads=["data", "simulation_start"], writes=["model"]) def build_model(state: State) -> Tuple[dict, State]: """This would fit the model on data before the simulation start date.""" training_data = state["data"] model = _fit_model(training_data, upto=state["simulation_start"]) result = {"model": model} return result, state.update(**result) ``` -------------------------------- ### Install Burr Dependencies Source: https://github.com/apache/burr/blob/main/examples/parallelism/notebook.ipynb Installs the Apache Burr library with specific extras for start and OpenTelemetry, along with OpenTelemetry and OpenAI libraries. This is a prerequisite for running the examples. ```python # install some dependencies and a few more %pip install "apache-burr[start,opentelemetry]" opentelemetry-instrumentation-openai openai anthropic ``` -------------------------------- ### Execute Application Step by Step Source: https://github.com/apache/burr/blob/main/examples/adaptive-crag/notebook.ipynb Demonstrates how to execute an application step-by-step using the `step` method for synchronous contexts and `astep` for asynchronous contexts. It also shows how to pass inputs to actions. ```python action, result, state = application.step() If you’re in an async context, you can run astep instead: action, result, state = await application.astep() Step can also take in inputs as a dictionary, which will be passed to the action’s run function as keyword arguments. This is specifically meant for a “human in the loop” scenario, where the action needs to ask for input from a user. In this case, the control flow is meant to be interrupted to allow for the user to provide input. See inputs for more information. ``` -------------------------------- ### Build and serve documentation Source: https://github.com/apache/burr/blob/main/docs/contributing/iterating.rst Use sphinx-autobuild to serve the documentation locally for development. ```bash $ sphinx-autobuild -b dirhtml -W -E -T --watch docs/ -a docs /tmp/mydocs ``` -------------------------------- ### Instantiate and Run Application Source: https://github.com/apache/burr/blob/main/examples/talks/data_for_ai_oct_2024.ipynb Builds the application with the defined graph, initial state, and entrypoint, then runs it until a halt condition is met. ```python app = ( ApplicationBuilder() .with_graph(graph) .with_state(counter=0) .with_entrypoint("increment") .build() ) action_obj, result, state = app.run(halt_after=["exit_counter"]) ``` -------------------------------- ### Install Burr using Poetry Source: https://github.com/apache/burr/blob/main/docs/getting_started/install.rst Manual installation command for Poetry users to bypass dependency resolution issues with the start target. ```bash poetry add loguru "apache-burr[tracking-client,tracking-server,streamlit,graphviz,hamilton]" ``` -------------------------------- ### Execute Application Step-by-Step Source: https://github.com/apache/burr/blob/main/docs/concepts/state-machine.rst Use step or astep to execute a single action and retrieve the resulting state. ```python action, result, state = application.step() ``` ```python action, result, state = await application.astep() ``` ```python action, result, state = application.step(inputs={"prompt": input()}) ``` -------------------------------- ### Install Apache Burr and OpenAI Source: https://github.com/apache/burr/blob/main/examples/email-assistant/notebook.ipynb Installs the necessary libraries for the email assistant application, including Apache Burr with the 'start' extra and the OpenAI package. ```python !pip install apache-burr[start] openai ``` -------------------------------- ### Build Application with Tracker Source: https://github.com/apache/burr/blob/main/examples/simple-chatbot-intro/notebook.ipynb Configure an application with actions, transitions, state, an entrypoint, and enable tracking to a local project. ```python app_with_tracker = ( ApplicationBuilder().with_actions( human_input=human_input, ai_response=ai_response, safety_check=safety_check, unsafe_response=unsafe_response ).with_transitions( ("human_input", "safety_check"), ("safety_check", "unsafe_response", when(safe=False)), ("safety_check", "ai_response", when(safe=True)), (["unsafe_response", "ai_response"], "human_input"), ).with_state(chat_history=[]) .with_entrypoint("human_input") .with_tracker( "local", project="demo_getting_started" ).build() ) ``` -------------------------------- ### Install Apache Burr and Dependencies Source: https://github.com/apache/burr/blob/main/examples/deep-researcher/notebook.ipynb Install the Apache Burr library with 'start' extras, and the 'openai' and 'tavily-python' packages. These are required to run the deep researcher. ```python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 ( # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. ``` ```python !pip install apache-burr[start] !pip install openai !pip install tavily-python ``` -------------------------------- ### Install Apache Burr with Extras Source: https://github.com/apache/burr/blob/main/examples/talks/data_for_ai_oct_2024.ipynb Install Burr along with the 'start' and 'opentelemetry' extras, and the OpenAI instrumentation for OpenTelemetry. This command is typically run in a notebook environment. ```python #!pip install apache-burr[start,opentelemetry] opentelemetry-instrumentation-openai ``` -------------------------------- ### Install Apache Burr Source: https://github.com/apache/burr/blob/main/README.md Install the package using pip. ```bash pip install "apache-burr[start]" ``` -------------------------------- ### Install Langfuse Integration Source: https://github.com/apache/burr/blob/main/docs/reference/integrations/langfuse.rst Command to install the necessary dependencies for the Langfuse integration. ```bash pip install "apache-burr[langfuse]" ``` -------------------------------- ### Initialize Application with Tracking and Checkpointing Source: https://github.com/apache/burr/blob/main/docs/examples/chatbots/gpt-like-chatbot.ipynb Builds an application instance using a graph and initializes it with a tracking client for checkpointing and state management. Requires `LocalTrackingClient` and `ApplicationBuilder`. ```python tracker = LocalTrackingClient(project="agent-demo") app = ( ApplicationBuilder() .with_graph(base_graph) .initialize_from( tracker, resume_at_next_action=True, default_state={"chat_history": []}, default_entrypoint="prompt", ) .with_tracker(tracker) # tracking + checkpointing; one line 🪄. .build() ) app ``` -------------------------------- ### Install Bedrock integration Source: https://github.com/apache/burr/blob/main/docs/reference/integrations/bedrock.rst Install the necessary dependencies to use Bedrock with Burr. ```bash pip install "apache-burr[bedrock]" ``` -------------------------------- ### Build the tracking UI Source: https://github.com/apache/burr/blob/main/docs/contributing/iterating.rst Build the UI and prepare it for use with the tracking server. ```bash $ burr-admin-build-ui ``` -------------------------------- ### Install pytest Source: https://github.com/apache/burr/blob/main/examples/pytest/README.md Install pytest using pip. This is a prerequisite for using pytest for testing. ```bash pip install pytest ``` -------------------------------- ### Publish the package Source: https://github.com/apache/burr/blob/main/CONTRIBUTING.rst Builds the frontend and publishes the backend to the production PyPI instance. Requires valid PyPI credentials. ```bash $ burr-admin-publish --prod ``` -------------------------------- ### Initialize Application from Prior State Source: https://github.com/apache/burr/blob/main/examples/conversational-rag/simple_example/notebook.ipynb Use `initialize_from()` with a `TrackingClient` to load a previous application state. Set `resume_at_next_action=False` to always start at a specified entrypoint, like 'human_converse'. ```python # Now let's show how to use the ApplicationBuilder.initialize_from() method to pick up where we left off. # This is useful if you want to continue a user conversation, or if you had a crash, etc. # set up for rewinding to a prior state -- loading it in as initial state prior_app_id = app_id project_name = "demo:conversational-rag" # we use the tracking client here to get the state of the application at a prior sequence_id tracker = LocalTrackingClient(project=project_name) pick_up_where_we_left_off_app = ( ApplicationBuilder() # add the actions .with_actions( # bind the vector store to the AI conversational step ai_converse=ai_converse.bind(vector_store=vector_store), human_converse=human_converse, terminal=burr.core.Result("chat_history"), ) # set the transitions between actions .with_transitions( ("ai_converse", "human_converse", default), ("human_converse", "terminal", expr("'exit' in question")), ("human_converse", "ai_converse", default), ) # add identifiers that will help track the application .with_identifiers(app_id=prior_app_id, partition_key="sample_user") .initialize_from( initializer=tracker, resume_at_next_action=False, # we want to always start at human_converse; our entrypoint default_entrypoint="human_converse", default_state=initial_state, # set some default state incase we can't find the prior state ) # add a hook to print the steps -- optional but shows that Burr is pluggable .with_hooks(PrintStepHook()) # add tracking -- this will show up in the BURR UI. .with_tracker(tracker) # build the application .build() ) ``` -------------------------------- ### Install Streamlit integration Source: https://github.com/apache/burr/blob/main/docs/reference/integrations/streamlit.rst Use pip to install the necessary dependencies for Streamlit support. ```bash pip install apache-burr[streamlit] ``` -------------------------------- ### Install Burr in developer mode Source: https://github.com/apache/burr/blob/main/docs/contributing/setup.rst Install the project dependencies and the package in editable mode. ```bash cd burr pip install -e ".[developer]" ``` ```bash pip install -e . --group dev ``` ```bash uv sync ``` -------------------------------- ### Initialize Streaming Application Source: https://github.com/apache/burr/blob/main/examples/streaming-overview/notebook.ipynb Create an instance of the streaming application. ```python app = streaming_application() ``` -------------------------------- ### Install OpenTelemetry Instrumentation Source: https://github.com/apache/burr/blob/main/docs/concepts/additional-visibility.rst Install the necessary OpenTelemetry package for the specific LLM provider being used. ```bash # install the appropriate openllmetry package pip install opentelemetry-instrumentation-openai ``` -------------------------------- ### Build Application with Custom Initial State Source: https://github.com/apache/burr/blob/main/examples/multi-agent-collaboration/lcel/notebook.ipynb Create a new application instance by providing a custom initial state, which includes a modified starting query. This allows for dynamic control over the application's objective. ```python # Let's change the query initial_state, entry_point = default_state_and_entry_point("Fetch the USA's GDP over the past 5 years, then draw a line graph of it. " "Once the python code has been written and the graph drawn, the task is complete.") app2 = build_application(initial_state, entry_point) ``` -------------------------------- ### Install Python Modules Source: https://github.com/apache/burr/blob/main/examples/conversational-rag/graph_db_example/README.md Installs necessary Python packages for the project. Ensure you have a requirements.txt file. ```sh pip install -r requirements.txt ``` -------------------------------- ### Install Burr optional dependencies Source: https://github.com/apache/burr/blob/main/docs/getting_started/install.rst Various installation targets for specific features, integrations, and development environments. ```bash pip install "apache-burr[cli]" ``` ```bash pip install "apache-burr[developer]" ``` ```bash pip install "apache-burr[documentation]" ``` ```bash pip install "apache-burr[examples]" ``` ```bash pip install "apache-burr[graphviz]" ``` ```bash pip install "apache-burr[hamilton]" ``` ```bash pip install "apache-burr[haystack]" ``` ```bash pip install "apache-burr[learn]" ``` ```bash pip install "apache-burr[opentelemetry]" ``` ```bash pip install "apache-burr[postgresql]" ``` ```bash pip install "apache-burr[pydantic]" ``` ```bash pip install "apache-burr[redis]" ``` ```bash pip install "apache-burr[streamlit]" ``` ```bash pip install "apache-burr[tests]" ``` ```bash pip install "apache-burr[tracking]" ``` ```bash pip install "apache-burr[tracking-client]" ``` ```bash pip install "apache-burr[tracking-client-s3]" ``` ```bash pip install "apache-burr[tracking-server-s3]" ``` ```bash pip install "apache-burr[tracking-server]" ``` ```bash pip install "apache-burr[bedrock]" ``` -------------------------------- ### Define Application Clients and Connections Source: https://github.com/apache/burr/blob/main/examples/conversational-rag/graph_db_example/notebook.ipynb Initialize clients for OpenAI and FalkorDB, and set up graph and application identifiers. Ensure necessary libraries like 'openai' and 'uuid' are imported. ```python # define our clients / connections / IDs openai_client = openai.OpenAI() db_client = FalkorDB(host='localhost', port=6379) graph_name = "UFC" application_run_id = str(uuid.uuid4()) ``` -------------------------------- ### Install Burr and Dependencies Source: https://github.com/apache/burr/blob/main/examples/custom-serde/notebook.ipynb Install the necessary libraries for using Burr, including optional components for enhanced functionality. ```python !pip install apache-burr[start] langchain_core langchain_community pydantic # we only need these to show case the automatic serialization and deserialization that Burr has. ``` -------------------------------- ### Run Demo Application Source: https://github.com/apache/burr/blob/main/examples/custom-serde/README.md Execute the main Python script to run the custom serialization and deserialization demo. ```bash python application.py ``` -------------------------------- ### Define LLM Application Logic with Actions and Transitions Source: https://github.com/apache/burr/blob/main/examples/hamilton-integration/notebook.ipynb Outline the structure of an LLM application by defining actions, their state dependencies (reads/writes), and the transitions between them. This example shows how to set up an application for ingesting blog content and answering questions about it. ```python from burr.core import action, State, ApplicationBuilder # `reads` and `writes` specify what data is read/written via the `State`. @action(reads=[], writes=["blog_content"]) def ingest_blog(state: State, blog_post_url: str) -> State: """Download a blog post and parse it""" blog_content = ... return state.update(blog_content=blog_content) @action(reads=["blog_content", "history"], writes=["history"]) def ask_question(state: State, user_query: str) -> State: """Reply to the user's query using the blog's content.""" history = state["history"] blog_content = state["blog_content"] response = ... return state.append(history=response) # the `ApplicationBuilder` receives the actions, # specifies the transitions, and sets the starting action. ( ApplicationBuilder() .with_actions(ingest_blog, ask_question) .with_transitions(("ingest_blog", "ask_question")) .with_entrypoint("ingest_blog") .build() ) ``` -------------------------------- ### Install Burr S3 dependencies Source: https://github.com/apache/burr/blob/main/docs/concepts/s3-tracking-aws.rst Install the necessary packages for the S3 tracking client and the S3-backed tracking server. ```bash pip install "burr[tracking-client-s3]" ``` ```bash pip install "burr[tracking-server-s3,cli]" ``` -------------------------------- ### Instantiate and visualize the streaming application Source: https://github.com/apache/burr/blob/main/examples/streaming-fastapi/notebook.ipynb Create an instance of the streaming application and visualize its structure using the .visualize() method. This is useful for understanding the application's flow. ```python app = streaming_application() app.visualize() ``` -------------------------------- ### Install and Configure Langfuse Integration Source: https://github.com/apache/burr/blob/main/examples/integrations/langfuse/README.md Install the necessary dependencies and set environment variables to enable Langfuse tracing in a Burr application. ```bash pip install "apache-burr[langfuse]" openai opentelemetry-instrumentation-openai export LANGFUSE_PUBLIC_KEY="pk-lf-..." export LANGFUSE_SECRET_KEY="sk-lf-..." export LANGFUSE_HOST="https://cloud.langfuse.com" # or your self-hosted URL export OPENAI_API_KEY="sk-..." python application.py ``` -------------------------------- ### Install Dependencies for Burr and Langchain Source: https://github.com/apache/burr/blob/main/examples/multi-agent-collaboration/hamilton/notebook.ipynb Installs the necessary libraries for Apache Burr, Langchain, and OpenAI, along with visualization tools for Hamilton. ```python # %pip install -U apache-burr[start] langchain-community langchain-core langchain-experimental openai sf-hamilton[visualization] ``` -------------------------------- ### Run Jupyter Notebook Source: https://github.com/apache/burr/blob/main/examples/simple-chatbot-intro/README.md Launch the Jupyter Notebook server to access and run the example notebook. After running this command, you can open the 'notebook.ipynb' file in your browser. ```bash jupyter notebook ``` -------------------------------- ### Install Bedrock Dependencies Source: https://github.com/apache/burr/blob/main/examples/integrations/bedrock/README.md Install the necessary Python packages for the Bedrock integration from the provided requirements file. Ensure you are in the repository root. ```bash pip install -r examples/integrations/bedrock/requirements.txt ``` -------------------------------- ### Install Dependencies Source: https://github.com/apache/burr/blob/main/examples/hamilton-integration/notebook.ipynb Installs necessary Python packages for Hamilton, Burr, and related libraries. Use this when setting up your environment, especially in Colab. ```python # execute this cell to install dependencies in the current environment # useful when using Google Colab notebooks %pip install sf-hamilton[visualization] requests openai lancedb apache-burr[start,opentelemetry] pydantic pyarrow opentelemetry-instrumentation-openai opentelemetry-instrumentation-lancedb ``` -------------------------------- ### Install Vercel CLI Source: https://github.com/apache/burr/blob/main/examples/deployment/vercel/README.md Install the Vercel Command Line Interface globally using npm. This is a prerequisite for local development and deployment. ```bash npm install -g vercel ``` -------------------------------- ### Define Initial State Variables Source: https://github.com/apache/burr/blob/main/examples/multi-agent-collaboration/lcel/notebook.ipynb Set up variables for application instance ID, sequence number, project name, and the default query for the agents. These can be adjusted to load prior executions. ```python # Adjust these if you want to load a prior execution app_instance_id = None sequence_id = None project_name = "demo_lcel-multi-agent" # CHANGE THIS IF YOU WANT SOMETHING DIFFERENT! default_query = ("Fetch the UK's GDP over the past 5 years, then draw a line graph of it. " "Once the python code has been written and the graph drawn, the task is complete.") ``` -------------------------------- ### Preview production build Source: https://github.com/apache/burr/blob/main/telemetry/ui/README.md Serves the production build locally using the Vite preview server. ```bash npm run preview ```