Skip to content

Commit

Permalink
Merge branch 'main' into adam/openai-assistans-api-example
Browse files Browse the repository at this point in the history
  • Loading branch information
adamnolte committed Feb 26, 2024
2 parents e73c3fa + 7c66d51 commit d4b2a3f
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 19 deletions.
3 changes: 2 additions & 1 deletion JavaScript/chatbot-nextjs/src/pages/api/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 2 additions & 1 deletion JavaScript/chatbot-nextjs/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down
2 changes: 1 addition & 1 deletion JavaScript/openai-tracing/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion JavaScript/spans/src/index.js
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
8 changes: 4 additions & 4 deletions Python/flask/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Python/flask/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
8 changes: 4 additions & 4 deletions Python/openai-tracing/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Python/openai-tracing/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
8 changes: 4 additions & 4 deletions Python/prompt-sdk-headless/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Python/prompt-sdk-headless/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit d4b2a3f

Please sign in to comment.