Skip to content

Commit 535bc1d

Browse files
committed
Release 1.4.7
1 parent c7b2f6b commit 535bc1d

17 files changed

Lines changed: 1133 additions & 11 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM --platform=linux/amd64 mcr.microsoft.com/devcontainers/cpp:1-ubuntu-24.04
2+
3+
ARG REINSTALL_CMAKE_VERSION_FROM_SOURCE="none"
4+
5+
# Optionally install the cmake for vcpkg
6+
COPY ./reinstall-cmake.sh /tmp/
7+
8+
RUN if [ "${REINSTALL_CMAKE_VERSION_FROM_SOURCE}" != "none" ]; then \
9+
chmod +x /tmp/reinstall-cmake.sh && /tmp/reinstall-cmake.sh ${REINSTALL_CMAKE_VERSION_FROM_SOURCE}; \
10+
fi \
11+
&& rm -f /tmp/reinstall-cmake.sh
12+
13+
# [Optional] Uncomment this section to install additional vcpkg ports.
14+
# RUN su vscode -c "${VCPKG_ROOT}/vcpkg install <your-port-name-here>"
15+
16+
# [Optional] Uncomment this section to install additional packages.
17+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
18+
# && apt-get -y install --no-install-recommends <your-package-list-here>

.devcontainer/devcontainer.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/cpp
3+
{
4+
"name": "C++",
5+
"build": {
6+
"dockerfile": "Dockerfile"
7+
},
8+
"features": {
9+
"ghcr.io/devcontainers/features/git:1": {},
10+
"ghcr.io/devcontainers/features/python:1": {},
11+
"ghcr.io/balazs23/devcontainers-features/bazel:1": {}
12+
}
13+
14+
// Features to add to the dev container. More info: https://containers.dev/features.
15+
// "features": {},
16+
17+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
18+
// "forwardPorts": [],
19+
20+
// Use 'postCreateCommand' to run commands after the container is created.
21+
// "postCreateCommand": "gcc -v",
22+
23+
// Configure tool-specific properties.
24+
// "customizations": {},
25+
26+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
27+
// "remoteUser": "root"
28+
}

.devcontainer/reinstall-cmake.sh

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/usr/bin/env bash
2+
#-------------------------------------------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
5+
#-------------------------------------------------------------------------------------------------------------
6+
#
7+
set -e
8+
9+
CMAKE_VERSION=${1:-"none"}
10+
11+
if [ "${CMAKE_VERSION}" = "none" ]; then
12+
echo "No CMake version specified, skipping CMake reinstallation"
13+
exit 0
14+
fi
15+
16+
# Cleanup temporary directory and associated files when exiting the script.
17+
cleanup() {
18+
EXIT_CODE=$?
19+
set +e
20+
if [[ -n "${TMP_DIR}" ]]; then
21+
echo "Executing cleanup of tmp files"
22+
rm -Rf "${TMP_DIR}"
23+
fi
24+
exit $EXIT_CODE
25+
}
26+
trap cleanup EXIT
27+
28+
29+
echo "Installing CMake..."
30+
apt-get -y purge --auto-remove cmake
31+
mkdir -p /opt/cmake
32+
33+
architecture=$(dpkg --print-architecture)
34+
case "${architecture}" in
35+
arm64)
36+
ARCH=aarch64 ;;
37+
amd64)
38+
ARCH=x86_64 ;;
39+
*)
40+
echo "Unsupported architecture ${architecture}."
41+
exit 1
42+
;;
43+
esac
44+
45+
CMAKE_BINARY_NAME="cmake-${CMAKE_VERSION}-linux-${ARCH}.sh"
46+
CMAKE_CHECKSUM_NAME="cmake-${CMAKE_VERSION}-SHA-256.txt"
47+
TMP_DIR=$(mktemp -d -t cmake-XXXXXXXXXX)
48+
49+
echo "${TMP_DIR}"
50+
cd "${TMP_DIR}"
51+
52+
curl -sSL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_BINARY_NAME}" -O
53+
curl -sSL "https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_CHECKSUM_NAME}" -O
54+
55+
sha256sum -c --ignore-missing "${CMAKE_CHECKSUM_NAME}"
56+
sh "${TMP_DIR}/${CMAKE_BINARY_NAME}" --prefix=/opt/cmake --skip-license
57+
58+
ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
59+
ln -s /opt/cmake/bin/ctest /usr/local/bin/ctest

.env

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Agents-CPP-SDK Configuration
2+
3+
# OpenAI API Key
4+
# PROVIDER=openai
5+
# OPENAI_API_KEY=your_openai_api_key_here
6+
7+
# Anthropic API Key
8+
# PROVIDER=anthropic
9+
# ANTHROPIC_API_KEY=your_anthropic_api_key_here
10+
11+
# Google API Key
12+
# PROVIDER=google
13+
# API_KEY=your_google_api_key_here
14+
# MODEL=gemini-2.5-flash
15+
16+
# Ollama Settings
17+
PROVIDER=ollama
18+
OLLAMA_BASE_URL=http://localhost:11434
19+
MODEL=gpt-oss:20b
20+
21+
# Default settings
22+
DEFAULT_PROVIDER=openai
23+
DEFAULT_MODEL=gpt-4o

BUILD

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,18 @@ cc_import(
2828
"//conditions:default": None,
2929
}),
3030
deps = [
31+
"@cpp-httplib//:httplib",
3132
"@nlohmann_json//:json",
3233
":python"
3334
],
3435
visibility = ["//visibility:public"]
3536
)
3637

38+
exports_files([
39+
".env",
40+
"sample_media/ui/index.html",
41+
],
42+
visibility = ["__subpackages__"]
43+
)
44+
3745
# End of BUILD file

MODULE.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ module(name = "agents", version = "0.1.0")
88
bazel_dep(name = "platforms", version = "0.0.11")
99
bazel_dep(name = "rules_cc", version = "0.1.4")
1010

11+
# HTTP library
12+
bazel_dep(name = "cpp-httplib", version = "0.16.3.bzl.1")
13+
1114
# JSON library
1215
bazel_dep(name = "nlohmann_json", version = "3.11.3")
1316

MODULE.bazel.lock

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demos/in-car/BUILD

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"""
2+
In-Car AI Assistant Demo
3+
"""
4+
cc_binary(
5+
name = "in-car-ai",
6+
srcs = ["in-car-ai.cpp"],
7+
deps = ["//:agents_cpp"],
8+
data = ["//:.env"]
9+
)

0 commit comments

Comments
 (0)