diff --git a/app/api/Dockerfile b/app/api/Dockerfile index ed7b6d1f..27e763f5 100644 --- a/app/api/Dockerfile +++ b/app/api/Dockerfile @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC + FROM python:3.12.5-slim-bookworm diff --git a/app/api/agent_control/Dockerfile b/app/api/agent_control/Dockerfile index 45054e72..db1fdfb0 100644 --- a/app/api/agent_control/Dockerfile +++ b/app/api/agent_control/Dockerfile @@ -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 diff --git a/app/api/agent_control/agent.py b/app/api/agent_control/agent.py index e2d65b30..ef646aff 100644 --- a/app/api/agent_control/agent.py +++ b/app/api/agent_control/agent.py @@ -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 diff --git a/app/api/agent_control/code_tool.py b/app/api/agent_control/code_tool.py index 435b8ca2..51fa1a89 100644 --- a/app/api/agent_control/code_tool.py +++ b/app/api/agent_control/code_tool.py @@ -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 diff --git a/app/api/agent_control/custom_llm.py b/app/api/agent_control/custom_llm.py index 56682ae5..ac97c6a5 100644 --- a/app/api/agent_control/custom_llm.py +++ b/app/api/agent_control/custom_llm.py @@ -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, @@ -22,7 +26,6 @@ from langchain.callbacks.streaming_stdout_final_only import FinalStreamingStdOutCallbackHandler import requests import json -import os class CustomLLM(BaseChatModel): diff --git a/app/api/agent_control/utils.py b/app/api/agent_control/utils.py index 25dde108..e584a201 100644 --- a/app/api/agent_control/utils.py +++ b/app/api/agent_control/utils.py @@ -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