Skip to content

Commit

Permalink
Merge branch 'main' into release/v0.28.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-agenta committed Dec 9, 2024
2 parents 18436a3 + d7c4e91 commit f47a294
Show file tree
Hide file tree
Showing 61 changed files with 2,332 additions and 609 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,15 @@
"bug",
"infra"
]
},
{
"login": "morenobonaventura",
"name": "Moreno Bonaventura",
"avatar_url": "https://avatars.githubusercontent.com/u/2118854?v=4",
"profile": "https://github.com/morenobonaventura",
"contributions": [
"bug"
]
}
],
"contributorsPerLine": 7,
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/check-app-accessibility/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ runs:
fi
status_code=$( \
curl --max-time 60 --write-out %{http_code} --silent --output /dev/null --verbose \
-H "Authorization: Bearer ${{ inputs.api-key }}" \
-H "Authorization: ApiKey ${{ inputs.api-key }}" \
$APP_URL)
echo "Attempt $i: Status code: $status_code"
if [ "$status_code" -eq 200 ]; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cli-commands-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
- name: Run agenta init
run: |
APP_NAME="gh-cli-$(date +'%d-%m-%y_%H-%M-%S')"
AGENTA_API_KEY=${{ secrets.AGENTA_API_KEY }} agenta init --app-name $APP_NAME --backend-host https://cloud.agenta.ai --organisation-name team
AGENTA_API_KEY=${{ secrets.AGENTA_API_KEY }} agenta init --app-name $APP_NAME --backend-host https://cloud.agenta.ai
working-directory: examples/deprecated_sdk_v2/baby_name_generator
shell: bash
continue-on-error: false
Expand Down
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,7 @@ Check out our [Contributing Guide](https://docs.agenta.ai/misc/contributing/gett
## Contributors ✨

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->

[![All Contributors](https://img.shields.io/badge/all_contributors-48-orange.svg?style=flat-square)](#contributors-)

[![All Contributors](https://img.shields.io/badge/all_contributors-49-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Expand Down Expand Up @@ -212,6 +210,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://ashrafchowdury.me"><img src="https://avatars.githubusercontent.com/u/87828904?v=4?s=100" width="100px;" alt="Ashraf Chowdury"/><br /><sub><b>Ashraf Chowdury</b></sub></a><br /><a href="https://github.com/Agenta-AI/agenta/issues?q=author%3Aashrafchowdury" title="Bug reports">🐛</a> <a href="https://github.com/Agenta-AI/agenta/commits?author=ashrafchowdury" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jp-agenta"><img src="https://avatars.githubusercontent.com/u/174311389?v=4?s=100" width="100px;" alt="jp-agenta"/><br /><sub><b>jp-agenta</b></sub></a><br /><a href="https://github.com/Agenta-AI/agenta/commits?author=jp-agenta" title="Code">💻</a> <a href="https://github.com/Agenta-AI/agenta/issues?q=author%3Ajp-agenta" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://mrunhap.github.io"><img src="https://avatars.githubusercontent.com/u/24653356?v=4?s=100" width="100px;" alt="Mr Unhappy"/><br /><sub><b>Mr Unhappy</b></sub></a><br /><a href="https://github.com/Agenta-AI/agenta/issues?q=author%3Amrunhap" title="Bug reports">🐛</a> <a href="#infra-mrunhap" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/morenobonaventura"><img src="https://avatars.githubusercontent.com/u/2118854?v=4?s=100" width="100px;" alt="Moreno Bonaventura"/><br /><sub><b>Moreno Bonaventura</b></sub></a><br /><a href="https://github.com/Agenta-AI/agenta/issues?q=author%3Amorenobonaventura" title="Bug reports">🐛</a></td>
</tr>
</tbody>
</table>
Expand All @@ -222,5 +221,3 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind are welcome!

**Attribution**: Testing icons created by [Freepik - Flaticon](https://www.flaticon.com/free-icons/testing)
2 changes: 1 addition & 1 deletion agenta-backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ This backend takes care of the following:
- managing configurations and prompts for the application

## Architecture
See [here](https://docs.agenta.ai/concepts/architecture#agenta-architecture).
See [here](https://docs.agenta.ai/concepts/architecture#agenta-architecture).
15 changes: 14 additions & 1 deletion agenta-backend/agenta_backend/core/shared/dtos.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,20 @@


class LifecycleDTO(BaseModel):
created_at: datetime
created_at: Optional[datetime] = None
updated_at: Optional[datetime] = None

updated_by_id: Optional[UUID] = None


class IdentifierDTO(BaseModel):
id: UUID


class SlugDTO(BaseModel):
slug: str


class HeaderDTO(BaseModel):
name: Optional[str] = None
description: Optional[str] = None
36 changes: 35 additions & 1 deletion agenta-backend/agenta_backend/dbs/postgres/shared/dbas.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from sqlalchemy import Column, UUID, TIMESTAMP, func
from sqlalchemy.dialects.postgresql import JSONB
from sqlalchemy import Column, String, UUID, TIMESTAMP, func, Integer


class ProjectScopeDBA:
Expand Down Expand Up @@ -27,3 +28,36 @@ class LifecycleDBA:
UUID(as_uuid=True),
nullable=True,
)


class IdentifierDBA:
__abstract__ = True

id = Column(UUID(as_uuid=True), nullable=False)


class SlugDBA:
__abstract__ = True

slug = Column(String, nullable=False)


class HeaderDBA:
__abstract__ = True

name = Column(String, nullable=True)
description = Column(String, nullable=True)


class VersionedDBA:
__abstract__ = True

slug = Column(String, nullable=False)
version = Column(Integer, nullable=False)
id = Column(UUID(as_uuid=True), nullable=False)


class TagsDBA:
__abstract__ = True

tags = Column(JSONB(none_as_null=True), nullable=True)
7 changes: 7 additions & 0 deletions agenta-backend/agenta_backend/routers/projects_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,17 @@


class ProjectsResponse(BaseModel):
organization_id: Optional[UUID] = None
organization_name: Optional[str] = None
# is_default_organization: Optional[bool] = None
workspace_id: Optional[UUID] = None
workspace_name: Optional[str] = None
# is_default_workspace: Optional[bool] = None
project_id: UUID
project_name: str
# is_default_project: bool
user_role: Optional[str] = None
is_demo: Optional[bool] = None


router = APIRouter()
Expand Down Expand Up @@ -64,11 +68,14 @@ async def get_projects(

projects = [
ProjectsResponse(
organization_id=project_membership.project.organization.id,
organization_name=project_membership.project.organization.name,
workspace_id=project_membership.project.workspace.id,
workspace_name=project_membership.project.workspace.name,
project_id=project_membership.project.id,
project_name=project_membership.project.project_name,
user_role=project_membership.role,
is_demo=project_membership.is_demo,
)
for project_membership in _project_memberships
]
Expand Down
3 changes: 1 addition & 2 deletions agenta-backend/agenta_backend/services/app_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,12 @@ async def start_variant(

try:
logger.debug(
"Starting variant %s with image name %s and tags %s and app_name %s and organization %s and workspace %s",
"Starting variant %s with image name %s and tags %s and app_name %s",
db_app_variant.variant_name,
db_app_variant.image.docker_id,
db_app_variant.image.tags,
db_app_variant.app.app_name,
)
logger.debug("App name is %s", db_app_variant.app.app_name)
# update the env variables
domain_name = os.environ.get("DOMAIN_NAME")
if domain_name is None or domain_name == "http://localhost":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ def diff(ground_truth: Any, app_output: Any, compare_schema_only: bool) -> float
llm_app_output_value = flattened_app_output.get(key, None)

key_score = 0.0
if ground_truth_value and llm_app_output_value:
if ground_truth_value is not None and llm_app_output_value is not None:
key_score = diff(
{key: ground_truth_value},
{key: llm_app_output_value},
Expand Down
Loading

0 comments on commit f47a294

Please sign in to comment.