Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f37346c
Basic I/O for Encoded Image
rads-1996 Nov 3, 2025
1d5d1c4
remove commented line
rads-1996 Nov 3, 2025
b478b21
Update python/samples/getting_started/image_spec_poc/basic_input_outp…
rads-1996 Nov 3, 2025
166a666
Update python/samples/getting_started/image_spec_poc/basic_input_outp…
rads-1996 Nov 3, 2025
c437927
Update python/samples/getting_started/image_spec_poc/basic_input_outp…
rads-1996 Nov 3, 2025
8f7a2bd
Update python/samples/getting_started/image_spec_poc/basic_input_outp…
rads-1996 Nov 3, 2025
d7e6fd4
Update python/samples/getting_started/image_spec_poc/basic_input_outp…
rads-1996 Nov 3, 2025
a717a7b
Update python/samples/getting_started/image_spec_poc/basic_input_outp…
rads-1996 Nov 3, 2025
987b7c1
Sample for invoke agent and execute tool with dummy data
rads-1996 Nov 3, 2025
af10fa7
Image DB changes
rads-1996 Nov 25, 2025
4f71496
Update files with new syntax
rads-1996 Dec 18, 2025
826205b
Cleaned up files and added new logic for DB querying
rads-1996 Jan 8, 2026
0e5b292
Add newline
rads-1996 Jan 8, 2026
595591f
Delete python/samples/getting_started/image_spec_poc/invoke_agent_and…
rads-1996 Jan 8, 2026
1595d24
Delete python/samples/getting_started/image_spec_poc/basic_input_outp…
rads-1996 Jan 8, 2026
e3add29
Add newline to the EOF
rads-1996 Jan 8, 2026
345ee7a
Retrigger CI/CD pipeline
rads-1996 Jan 8, 2026
8c7b03c
Add newline
rads-1996 Jan 8, 2026
2e47a44
Remove newline
rads-1996 Jan 8, 2026
55f9a81
Remove newline
rads-1996 Jan 8, 2026
562be9d
Fix pre-commit errors
rads-1996 Jan 8, 2026
3f9cf87
Fix pre-commit errors
rads-1996 Jan 9, 2026
77ec1fa
Fix pre-commit error
rads-1996 Jan 9, 2026
de0813d
push updated db
rads-1996 Jan 9, 2026
74f693b
Merge branch 'main' of https://github.com/microsoft/agent-framework i…
rads-1996 Jan 9, 2026
9038cf5
Update tracing file with new observability setup
rads-1996 Jan 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import base64
from pathlib import Path

import dotenv
from datetime import datetime, timezone
from db_setup import SQLiteImageStore

dotenv.load_dotenv()

store: SQLiteImageStore | None = None

async def create_and_store_base64_encoded_images() -> tuple[str, str]:
global store
store = SQLiteImageStore()

"""Load and encode the images as base64."""
folder = Path("./images")

for file_path in sorted(folder.iterdir()):
if not file_path.is_file():
continue
with open(file_path, "rb") as f:
image_data = f.read()
image_base64 = base64.b64encode(image_data).decode('utf-8')
image_uri = f"data:image/jpeg;base64,{image_base64}"

text_id = f"{file_path.name}-{datetime.now(timezone.utc).strftime('%Y%m%dT%H%M%S')}"
file_name = file_path.name.split(".")[0]
record = await store.add_image_from_base64(
text_id=text_id,
base64_data=image_base64,
image_name=file_name,
description=f"{file_name} image",
metadata={"source": "sample", "scenario": "azure_ai_chat_client"},
tags=[file_name],
mime_type="image/jpeg",
image_uri=image_uri,
)
print(f"Stored image in SQLite with id={record.id} text_id={record.text_id}")
Loading
Loading