Skip to content

Commit

Permalink
Version Packages (#4322)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Feb 4, 2025
1 parent f089470 commit 096d254
Show file tree
Hide file tree
Showing 92 changed files with 553 additions and 279 deletions.
52 changes: 0 additions & 52 deletions .changeset/angry-llamas-move.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fuzzy-rockets-wash.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/good-pillows-leave.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/heavy-feet-behave.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/late-pants-wash.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/lazy-clouds-grin.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/nine-trees-punch.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/old-moose-appear.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/rare-planets-obey.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/red-deers-love.md

This file was deleted.

8 changes: 0 additions & 8 deletions .changeset/red-seals-wink.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/red-spiders-divide.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/shy-nails-happen.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/six-ghosts-pull.md

This file was deleted.

50 changes: 0 additions & 50 deletions .changeset/six-mangos-think.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/small-ads-accept.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/spicy-pumas-kneel.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tasty-chairs-smoke.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/thin-poets-build.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/thirty-clocks-glow.md

This file was deleted.

41 changes: 0 additions & 41 deletions .changeset/wise-jeans-chew.md

This file was deleted.

93 changes: 93 additions & 0 deletions packages/ai/ai/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,98 @@
# @effect/ai

## 0.8.2

### Patch Changes

- [#4378](https://github.com/Effect-TS/effect/pull/4378) [`f5e3b1b`](https://github.com/Effect-TS/effect/commit/f5e3b1bcdf24b440251ce8425d750353cf022e96) Thanks @IMax153! - Support non-identified schemas in `AiChat.structured` and `Completions.structured`.

Instead of requiring a `Schema` with either an `identifier` or `_tag` property
for AI APIs that allow for returning structured outputs, you can now optionally
pass a `correlationId` to `AiChat.structured` and `Completions.structured` when
you want to either use a simple schema or inline the schema.

Example:

```ts
import { Completions } from "@effect/ai"
import { OpenAiClient, OpenAiCompletions } from "@effect/ai-openai"
import { NodeHttpClient } from "@effect/platform-node"
import { Config, Effect, Layer, Schema, String } from "effect"

const OpenAi = OpenAiClient.layerConfig({
apiKey: Config.redacted("OPENAI_API_KEY")
}).pipe(Layer.provide(NodeHttpClient.layerUndici))

const Gpt4oCompletions = OpenAiCompletions.layer({
model: "gpt-4o"
}).pipe(Layer.provide(OpenAi))

const program = Effect.gen(function* () {
const completions = yield* Completions.Completions

const CalendarEvent = Schema.Struct({
name: Schema.String,
date: Schema.DateFromString,
participants: Schema.Array(Schema.String)
})

yield* completions.structured({
correlationId: "CalendarEvent",
schema: CalendarEvent,
input: String.stripMargin(`
|Extract event information from the following prose:
|
|Alice and Bob are going to a science fair on Friday.
`)
})
})

program.pipe(Effect.provide(Gpt4oCompletions), Effect.runPromise)
```

- [#4388](https://github.com/Effect-TS/effect/pull/4388) [`fcf3b7c`](https://github.com/Effect-TS/effect/commit/fcf3b7cc07a28635a5b53243b01cdeb6592dab3c) Thanks @IMax153! - Rename correlationId to toolCallId

- [#4389](https://github.com/Effect-TS/effect/pull/4389) [`f089470`](https://github.com/Effect-TS/effect/commit/f0894708e9d591b70eccf3a50ae91ac6e0f6d6e3) Thanks @IMax153! - Add support for [GenAI telemetry annotations](https://opentelemetry.io/docs/specs/semconv/attributes-registry/gen-ai/).

- [#4368](https://github.com/Effect-TS/effect/pull/4368) [`a0c85e6`](https://github.com/Effect-TS/effect/commit/a0c85e6601fd3e10d08085969f7453b7b517347b) Thanks @IMax153! - Support creation of embeddings from the AI integration packages.

For example, the following program will create an OpenAI `Embeddings` service
that will aggregate all embedding requests received within a `500` millisecond
window into a single batch.

```ts
import { Embeddings } from "@effect/ai"
import { OpenAiClient, OpenAiEmbeddings } from "@effect/ai-openai"
import { NodeHttpClient } from "@effect/platform-node"
import { Config, Effect, Layer } from "effect"

// Create the OpenAI client
const OpenAi = OpenAiClient.layerConfig({
apiKey: Config.redacted("OPENAI_API_KEY")
}).pipe(Layer.provide(NodeHttpClient.layerUndici))

// Create an embeddings service for the `text-embedding-3-large` model
const TextEmbeddingsLarge = OpenAiEmbeddings.layerDataLoader({
model: "text-embedding-3-large",
window: "500 millis",
maxBatchSize: 2048
}).pipe(Layer.provide(OpenAi))

// Use the generic `Embeddings` service interface in your program
const program = Effect.gen(function* () {
const embeddings = yield* Embeddings.Embeddings
const result = yield* embeddings.embed("The input to embed")
})

// Provide the specific implementation to use
program.pipe(Effect.provide(TextEmbeddingsLarge), Effect.runPromise)
```

- Updated dependencies [[`59b3cfb`](https://github.com/Effect-TS/effect/commit/59b3cfbbd5713dd9475998e95fad5534c0b21466), [`766113c`](https://github.com/Effect-TS/effect/commit/766113c0ea3512cdb887650ead8ba314236e22ee), [`bb05fb8`](https://github.com/Effect-TS/effect/commit/bb05fb83457355b1ca567228a9e041edfb6fd85d), [`712277f`](https://github.com/Effect-TS/effect/commit/712277f949052a24b46e4aa234063a6abf395c90), [`f269122`](https://github.com/Effect-TS/effect/commit/f269122508693b111142994dd48698ddc75f3d69), [`8f6006a`](https://github.com/Effect-TS/effect/commit/8f6006a610fb6d6c7b8d14209a7323338a8964ff), [`c45b559`](https://github.com/Effect-TS/effect/commit/c45b5592b5fd1189a5c932cfe05bd7d5f6d68508), [`430c846`](https://github.com/Effect-TS/effect/commit/430c846cbac05b187e3d24ac8dfee0cf22506f7c), [`7b03057`](https://github.com/Effect-TS/effect/commit/7b03057507d2dab5e6793beb9c578dedaaeb15fe), [`a9c94c8`](https://github.com/Effect-TS/effect/commit/a9c94c807755610831211a686d2fad849ab38eb4), [`107e6f0`](https://github.com/Effect-TS/effect/commit/107e6f0557a1e2d3b0dce25d62fa1e2601521752), [`c9175ae`](https://github.com/Effect-TS/effect/commit/c9175aef41cb1e3b689d0ac0a4f53d8107376b58), [`65c11b9`](https://github.com/Effect-TS/effect/commit/65c11b9266ec9447c31c26fe3ed35c73bd3b81fd), [`e386d2f`](https://github.com/Effect-TS/effect/commit/e386d2f1b3ab3ac2c14ee76de11f5963d32a3df4), [`9172efb`](https://github.com/Effect-TS/effect/commit/9172efba98bc6a82353e6ec2af61ac08f038ba64)]:
- @effect/platform@0.75.2
- [email protected]
- @effect/experimental@0.39.2

## 0.8.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/ai/ai/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@effect/ai",
"type": "module",
"version": "0.8.1",
"version": "0.8.2",
"license": "MIT",
"description": "Effect modules for working with AI apis",
"homepage": "https://effect.website",
Expand Down
Loading

0 comments on commit 096d254

Please sign in to comment.