diff --git a/JavaScript/chatbot-nextjs/src/pages/api/chat.ts b/JavaScript/chatbot-nextjs/src/pages/api/chat.ts index 8413698f..905c28fa 100644 --- a/JavaScript/chatbot-nextjs/src/pages/api/chat.ts +++ b/JavaScript/chatbot-nextjs/src/pages/api/chat.ts @@ -35,7 +35,8 @@ export default async function handler( // Substitute this for process.env.AUTOBLOCKS_INGESTION_KEY in a production environment // You can also initialize this outside of the handler in that case - const tracer = new AutoblocksTracer(autoblocksIngestionKey, { + const tracer = new AutoblocksTracer({ + ingestionKey: autoblocksIngestionKey, traceId, properties: { provider: 'openai', diff --git a/JavaScript/chatbot-nextjs/src/pages/index.tsx b/JavaScript/chatbot-nextjs/src/pages/index.tsx index 813acb74..6d1b527d 100644 --- a/JavaScript/chatbot-nextjs/src/pages/index.tsx +++ b/JavaScript/chatbot-nextjs/src/pages/index.tsx @@ -93,7 +93,8 @@ export default function Chat() { }; const onFeedback = async (feedback: 'positive' | 'negative') => { - const tracer = new AutoblocksTracer(autoblocksIngestionKey, { + const tracer = new AutoblocksTracer({ + ingestionKey: autoblocksIngestionKey, traceId, }); await tracer.sendEvent('user.feedback', { diff --git a/JavaScript/openai-tracing/src/index.js b/JavaScript/openai-tracing/src/index.js index f19a0858..1c046bc4 100644 --- a/JavaScript/openai-tracing/src/index.js +++ b/JavaScript/openai-tracing/src/index.js @@ -6,7 +6,7 @@ const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY, }); -const tracer = new AutoblocksTracer(process.env.AUTOBLOCKS_INGESTION_KEY, { +const tracer = new AutoblocksTracer({ // These apply to every call of tracer.sendEvent() so we don't have to repeat them traceId: crypto.randomUUID(), properties: { diff --git a/JavaScript/spans/src/index.js b/JavaScript/spans/src/index.js index be8b2bb8..5138429c 100644 --- a/JavaScript/spans/src/index.js +++ b/JavaScript/spans/src/index.js @@ -1,7 +1,7 @@ import crypto from 'crypto'; import { AutoblocksTracer } from '@autoblocks/client'; -const tracer = new AutoblocksTracer(process.env.AUTOBLOCKS_INGESTION_KEY, { +const tracer = new AutoblocksTracer({ traceId: crypto.randomUUID(), properties: { provider: 'openai', diff --git a/Python/flask/poetry.lock b/Python/flask/poetry.lock index d82eacaf..c2f3f5d7 100644 --- a/Python/flask/poetry.lock +++ b/Python/flask/poetry.lock @@ -24,13 +24,13 @@ trio = ["trio (>=0.23)"] [[package]] name = "autoblocksai" -version = "0.0.28" +version = "0.0.29" description = "Python client for Autoblocks" optional = false python-versions = ">=3.8.1,<4.0.0" files = [ - {file = "autoblocksai-0.0.28-py3-none-any.whl", hash = "sha256:93c4f91e4bdb3ca2bde1ef7b4b49f42bae9d60f32c679de8d1465fd9aa35ce20"}, - {file = "autoblocksai-0.0.28.tar.gz", hash = "sha256:e711213b6aba28fdd7ed3846fa3dd91a3f6f880fc276ffacb427ec963ff4a2ac"}, + {file = "autoblocksai-0.0.29-py3-none-any.whl", hash = "sha256:a600cb45b78226851fa992451593655695790daf07e816e9cdc64ab59b319b1b"}, + {file = "autoblocksai-0.0.29.tar.gz", hash = "sha256:a6dd96f815e2ceceb1cdfc29f0d009895443189d093d4cae2a42ec6a37784a0e"}, ] [package.dependencies] @@ -496,4 +496,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "bcbef04ea99a28471701558b729a0b85e5601d938733d80b6a1611490f69213a" +content-hash = "0aade864f761742d88d26913885a6971e3c251049703067036022b892b873d91" diff --git a/Python/flask/pyproject.toml b/Python/flask/pyproject.toml index b05523a4..19044ba9 100644 --- a/Python/flask/pyproject.toml +++ b/Python/flask/pyproject.toml @@ -9,6 +9,6 @@ packages = [{include = "myapp"}] [tool.poetry.dependencies] python = "^3.9" -autoblocksai = "^0.0.28" +autoblocksai = "^0.0.29" python-dotenv = "^1.0.0" flask = "^3.0.0" diff --git a/Python/openai-tracing/poetry.lock b/Python/openai-tracing/poetry.lock index 3b871d10..46d6b43b 100644 --- a/Python/openai-tracing/poetry.lock +++ b/Python/openai-tracing/poetry.lock @@ -34,13 +34,13 @@ trio = ["trio (<0.22)"] [[package]] name = "autoblocksai" -version = "0.0.28" +version = "0.0.29" description = "Python client for Autoblocks" optional = false python-versions = ">=3.8.1,<4.0.0" files = [ - {file = "autoblocksai-0.0.28-py3-none-any.whl", hash = "sha256:93c4f91e4bdb3ca2bde1ef7b4b49f42bae9d60f32c679de8d1465fd9aa35ce20"}, - {file = "autoblocksai-0.0.28.tar.gz", hash = "sha256:e711213b6aba28fdd7ed3846fa3dd91a3f6f880fc276ffacb427ec963ff4a2ac"}, + {file = "autoblocksai-0.0.29-py3-none-any.whl", hash = "sha256:a600cb45b78226851fa992451593655695790daf07e816e9cdc64ab59b319b1b"}, + {file = "autoblocksai-0.0.29.tar.gz", hash = "sha256:a6dd96f815e2ceceb1cdfc29f0d009895443189d093d4cae2a42ec6a37784a0e"}, ] [package.dependencies] @@ -514,4 +514,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "fcea717d094b5355e1d425a856449210ed222851b367a79cc2a0d0478b2aae27" +content-hash = "8415371ba5784c717f5e8c762e6e78e601d71d671892319192ace88143b8a915" diff --git a/Python/openai-tracing/pyproject.toml b/Python/openai-tracing/pyproject.toml index d072b558..75239904 100644 --- a/Python/openai-tracing/pyproject.toml +++ b/Python/openai-tracing/pyproject.toml @@ -10,7 +10,7 @@ packages = [{include = "src"}] [tool.poetry.dependencies] python = "^3.9" openai = "^1.0.0" -autoblocksai = "^0.0.28" +autoblocksai = "^0.0.29" python-dotenv = "^1.0.0" [tool.poetry.scripts] diff --git a/Python/prompt-sdk-headless/poetry.lock b/Python/prompt-sdk-headless/poetry.lock index 2a0bb9f3..f2742419 100644 --- a/Python/prompt-sdk-headless/poetry.lock +++ b/Python/prompt-sdk-headless/poetry.lock @@ -34,13 +34,13 @@ trio = ["trio (<0.22)"] [[package]] name = "autoblocksai" -version = "0.0.28" +version = "0.0.29" description = "Python client for Autoblocks" optional = false python-versions = ">=3.8.1,<4.0.0" files = [ - {file = "autoblocksai-0.0.28-py3-none-any.whl", hash = "sha256:93c4f91e4bdb3ca2bde1ef7b4b49f42bae9d60f32c679de8d1465fd9aa35ce20"}, - {file = "autoblocksai-0.0.28.tar.gz", hash = "sha256:e711213b6aba28fdd7ed3846fa3dd91a3f6f880fc276ffacb427ec963ff4a2ac"}, + {file = "autoblocksai-0.0.29-py3-none-any.whl", hash = "sha256:a600cb45b78226851fa992451593655695790daf07e816e9cdc64ab59b319b1b"}, + {file = "autoblocksai-0.0.29.tar.gz", hash = "sha256:a6dd96f815e2ceceb1cdfc29f0d009895443189d093d4cae2a42ec6a37784a0e"}, ] [package.dependencies] @@ -487,4 +487,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "4322123fce15622aa5a5b8e5a0a2cf5fd387bd67445861948c4d6a7e245e9f09" +content-hash = "bc0115dfc5b323bbc7293f191367f8eaa61b3139e4c085ec3e0d105e59894040" diff --git a/Python/prompt-sdk-headless/pyproject.toml b/Python/prompt-sdk-headless/pyproject.toml index 12e80758..6adbbe28 100644 --- a/Python/prompt-sdk-headless/pyproject.toml +++ b/Python/prompt-sdk-headless/pyproject.toml @@ -10,7 +10,7 @@ packages = [{include = "src"}] [tool.poetry.dependencies] python = "^3.9" openai = "^1.0.0" -autoblocksai = "0.0.28" +autoblocksai = "0.0.29" python-dotenv = "^1.0.0" pydantic = "^2.5.3"