Skip to content

Commit d0fc609

Browse files
Add source code license header
1 parent 5468c19 commit d0fc609

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+86
-50
lines changed

Diff for: Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
2+
# SPDX-License-Identifier: Apache-2.0
3+
14
PROJECT_NAME := agntcy_iomapper
25
DOCKER_IMAGE=$(PROJECT_NAME)
36
DOCKER_TAG=latest

Diff for: agntcy_iomapper/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
33
# ruff: noqa: F401
44
from agntcy_iomapper.agent import IOMappingAgent

Diff for: agntcy_iomapper/agent/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
33

44
from agntcy_iomapper.agent.agent_io_mapper import IOMappingAgent

Diff for: agntcy_iomapper/agent/agent_io_mapper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
33

44
import logging

Diff for: agntcy_iomapper/base/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
33

44
from agntcy_iomapper.base.base import (

Diff for: agntcy_iomapper/base/base.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
3+
34
import json
45
import logging
56
import re

Diff for: agntcy_iomapper/base/models.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
3+
34
import logging
45
from typing import Any, Callable, List, Optional, Union
56

Diff for: agntcy_iomapper/base/utils.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
2+
# SPDX-License-Identifier: Apache-2.0
3+
14
import copy
25
import json
36
import logging

Diff for: agntcy_iomapper/imperative/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
2-
# SPDX-License-Identifier: Apache-2.0"
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
2+
# SPDX-License-Identifier: Apache-2.0
33

44
from .imperative import (
55
ImperativeIOMapper,

Diff for: agntcy_iomapper/imperative/imperative.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
2-
# SPDX-License-Identifier: Apache-2.0"
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
2+
# SPDX-License-Identifier: Apache-2.0
3+
34
"""
45
The deterministic I/O mapper is a component
56
designed to translate specific inputs into

Diff for: agntcy_iomapper/langgraph/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
2-
# SPDX-License-Identifier: Apache-2.0"
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
2+
# SPDX-License-Identifier: Apache-2.0
33

44
from agntcy_iomapper.langgraph.create_langraph_iomapper import (
55
create_langraph_iomapper,

Diff for: agntcy_iomapper/langgraph/create_langraph_iomapper.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
2-
# SPDX-License-Identifier: Apache-2.0"
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
2+
# SPDX-License-Identifier: Apache-2.0
33

44
from langchain_core.runnables import Runnable
55

Diff for: agntcy_iomapper/langgraph/langgraph.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
3+
34
import logging
45
from typing import Any, Optional, Union
56

Diff for: agntcy_iomapper/llamaindex/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
2-
# SPDX-License-Identifier: Apache-2.0"
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
2+
# SPDX-License-Identifier: Apache-2.0
33

44
from agntcy_iomapper.llamaindex.models import (
55
IOMappingInputEvent,

Diff for: agntcy_iomapper/llamaindex/llamaindex.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
2-
# SPDX-License-Identifier: Apache-2.0"
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
2+
# SPDX-License-Identifier: Apache-2.0
3+
34
import logging
45
from typing import Any, List, Optional, Sequence
56

Diff for: agntcy_iomapper/pydantic_ai.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
3+
34
import logging
45
from typing import Any, Literal, Optional, Union
56

Diff for: agntcy_iomapper/version.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
3+
34
GIT_COMMIT = "NOT_SET"

Diff for: examples/Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
2+
# SPDX-License-Identifier: Apache-2.0
3+
14
EXAMPLES ?= .
25
VENV_NAME = venv
36
PYTHON = $(VENV_NAME)/bin/python

Diff for: examples/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0

Diff for: examples/langgraph/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
2-
# SPDX-License-Identifier: Apache-2.0"
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
2+
# SPDX-License-Identifier: Apache-2.0

Diff for: examples/langgraph/imperative.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
3+
34
import logging
45
from datetime import datetime
56
from typing import Optional

Diff for: examples/langgraph/langgraph_pydantic.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
3+
34
from typing import List, Optional
45

56
from langchain_core.messages import SystemMessage
@@ -32,7 +33,7 @@ def select_user_node(state: OverallState):
3233

3334
def define_campaign_node(state: OverallState):
3435
prompt = f"""
35-
You are a campaign builder for company XYZ. Given a list of selected users and a user prompt, create an engaging campaign.
36+
You are a campaign builder for company XYZ. Given a list of selected users and a user prompt, create an engaging campaign.
3637
Return the campaign details as a JSON object with the following structure:
3738
{{
3839
"name": "Campaign Name",
@@ -58,7 +59,7 @@ def define_campaign_node(state: OverallState):
5859

5960
def create_communication(state: OverallState):
6061
prompt = f"""
61-
You are an email communication creator. Given a campaign and a list of selected users, create an email communication.
62+
You are an email communication creator. Given a campaign and a list of selected users, create an email communication.
6263
Return the communication details as a JSON object with the following structure:
6364
{{
6465
"subject": "Email Subject",

Diff for: examples/langgraph/langgraph_typedict.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
2+
# SPDX-License-Identifier: Apache-2.0
3+
14
from typing import List, TypedDict, Union
25

36
from langchain.schema import Document

Diff for: examples/langgraph/langraph_manifest.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
2+
# SPDX-License-Identifier: Apache-2.0

Diff for: examples/llamaindex/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
2-
# SPDX-License-Identifier: Apache-2.0"
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
2+
# SPDX-License-Identifier: Apache-2.0

Diff for: examples/llamaindex/llamaindex_workflow.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
3+
34
from typing import List, Optional
45

56
from llama_index.core.output_parsers import PydanticOutputParser
@@ -59,7 +60,7 @@ async def create_campaign(
5960
self, ctx: Context, ev: CreateCampaignEvent
6061
) -> IOMappingInputEvent:
6162
prompt = f"""
62-
You are a campaign builder for company XYZ. Given a list of selected users and a user prompt, create an engaging campaign.
63+
You are a campaign builder for company XYZ. Given a list of selected users and a user prompt, create an engaging campaign.
6364
Return the campaign details as a JSON object with the following structure:
6465
{{
6566
"name": "Campaign Name",

Diff for: examples/llm.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
3-
#
3+
44
import os
55
from enum import Enum
66

Diff for: examples/models/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
33

44
from .models import *

Diff for: examples/models/data.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
2+
# SPDX-License-Identifier: Apache-2.0
3+
14
from typing import List
25

36
from examples.models import User

Diff for: examples/models/models.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
3+
34
from typing import List, TypedDict
45

56
from pydantic import BaseModel, Field

Diff for: tests/agentio_data.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
3+
34
from openapi_pydantic import DataType, Schema
45

56
from agntcy_iomapper.base import (

Diff for: tests/conftest.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
3+
34
import pytest
45
from dotenv import find_dotenv, load_dotenv
56
from langchain_openai.chat_models.azure import AzureChatOpenAI

Diff for: tests/test_agent_iomapper_from_manifest.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
2-
# SPDX-License-Identifier: Apache-2.0"
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
2+
# SPDX-License-Identifier: Apache-2.0
3+
34
import json
45
from pathlib import Path
56
from typing import List, TypedDict

Diff for: tests/test_imperative_iomapper.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
3+
34
import json
45

56
import pytest

Diff for: tests/test_langgraph_agent_iomapper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
33

44
from typing import TypedDict

Diff for: tests/test_langgraph_graph_with_io_mapper.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
3+
34
from typing import List, Optional
45

56
import pytest

Diff for: tests/test_pydantic_ai_agent_iomapper.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
3+
34
import re
45

56
import pytest
@@ -99,7 +100,7 @@ def test_agent_mapping(llm_iomapper_config, jinja_env, input, expected_output):
99100
assert len(mapdiff.affected_paths) == 0
100101

101102

102-
__COMPARE_SYSTEM_PROMPT = """You are comparing two texts for similarity.
103+
__COMPARE_SYSTEM_PROMPT = """You are comparing two texts for similarity.
103104
First, write out in a step by step manner your reasoning to be sure that your conclusion is correct. Avoid simply stating the correct answer at the outset. Then print only a single choice from [true, false] (without quotes or punctuation) on its own line corresponding to the correct answer. At the end, repeat just the answer by itself on a new line.
104105
"""
105106
__COMPARE_USER_PROMPT = """Here is the data:

Diff for: tests/unittests/test_langgraph_node.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
3+
34
import pytest
45
from langchain_core.language_models import FakeListChatModel
56

Diff for: tests/unittests/test_schema_mapping.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
3+
34
from typing import List, Optional
45

56
from pydantic import BaseModel, Field

Diff for: tests/unittests/test_schema_union_types.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
33

44
from enum import Enum

Diff for: tests/util.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 Cisco and/or its affiliates.
1+
# Copyright AGNTCY Contributors (https://github.com/agntcy)
22
# SPDX-License-Identifier: Apache-2.0
33

44
import re
@@ -18,7 +18,7 @@ class State(TypedDict):
1818
output: LangGraphIOMapperOutput
1919

2020

21-
__COMPARE_SYSTEM_PROMPT = """You are comparing two texts for similarity.
21+
__COMPARE_SYSTEM_PROMPT = """You are comparing two texts for similarity.
2222
First, write out in a step by step manner your reasoning to be sure that your conclusion is correct. Avoid simply stating the correct answer at the outset. Then print only a single choice from [true, false] (without quotes or punctuation) on its own line corresponding to the correct answer. At the end, repeat just the answer by itself on a new line.
2323
"""
2424
__COMPARE_USER_PROMPT = """Here is the data:

0 commit comments

Comments
 (0)