Skip to content

Commit

Permalink
add headers
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanniasingheTT committed Jan 24, 2025
1 parent c1cc506 commit 302581f
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
#
# SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC



FROM python:3.12.5-slim-bookworm
Expand Down
4 changes: 4 additions & 0 deletions app/api/agent_control/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
#
# SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC

# install ubutntu base image
FROM ubuntu:20.04
ENV TZ=America/Los_Angeles
Expand Down
4 changes: 4 additions & 0 deletions app/api/agent_control/agent.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
#
# SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC

from custom_llm import CustomLLM
from utils import poll_requests, setup_executer
from code_tool import CodeInterpreterFunctionTool
Expand Down
4 changes: 4 additions & 0 deletions app/api/agent_control/code_tool.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
#
# SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC

from pydantic import BaseModel, Field
from typing import List, Sequence, Tuple, Any
from langchain_core.messages import BaseMessage
Expand Down
5 changes: 4 additions & 1 deletion app/api/agent_control/custom_llm.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-License-Identifier: Apache-2.0
#
# SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC

from pydantic.v1 import BaseModel
from typing import (
List,
Expand All @@ -22,7 +26,6 @@
from langchain.callbacks.streaming_stdout_final_only import FinalStreamingStdOutCallbackHandler
import requests
import json
import os


class CustomLLM(BaseChatModel):
Expand Down
5 changes: 4 additions & 1 deletion app/api/agent_control/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# SPDX-License-Identifier: Apache-2.0
#
# SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC

from langchain.agents import AgentExecutor, create_react_agent
from langchain import hub
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder

async def poll_requests(agent_executor, config, tools, memory, message):
complete_output = "" # Initialize an empty string to accumulate output
Expand Down

0 comments on commit 302581f

Please sign in to comment.