You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -238,7 +238,7 @@ const main = Effect.gen(function*() {
238
238
239
239
**Flexibility**
240
240
241
-
If we know that one model or provider performs better at a given task than another, we can freely mix and match models and providers together.
241
+
If we know that one model or provider performs better at a given task than another, we can freely mix and match models and providers together.
242
242
243
243
For example, if we know Anthropic's Claude generates some really great dad jokes, we can mix it into our existing program with just a few lines of code:
// Yielding the model will return a layer with no requirements
295
-
//
295
+
//
296
296
// ┌─── Layer<AiLanguageModel>
297
297
// ▼
298
298
const gpt =yield*Gpt4o
@@ -313,7 +313,7 @@ class DadJokes extends Effect.Service<DadJokes>()("app/DadJokes", {
313
313
})
314
314
}) {}
315
315
316
-
// Programs which utilize the `DadJokes` service have no knowledge of
316
+
// Programs which utilize the `DadJokes` service have no knowledge of
317
317
// any AI requirements
318
318
//
319
319
// ┌─── Effect<void, AiError, DadJokes>
@@ -333,7 +333,7 @@ DadJokes.Default
333
333
334
334
## Create a Provider Client
335
335
336
-
To make our code executable, we must finish satisfying our program's requirements.
336
+
To make our code executable, we must finish satisfying our program's requirements.
337
337
338
338
Let's take another look at our program from earlier:
339
339
@@ -359,7 +359,7 @@ const main = generateDadJoke.pipe(
359
359
)
360
360
```
361
361
362
-
We can see that our `main` program still requires us to provide an `OpenAiClient`.
362
+
We can see that our `main` program still requires us to provide an `OpenAiClient`.
363
363
364
364
Each of our provider integration packages exports a client module that can be used to construct a client for that provider.
365
365
@@ -400,7 +400,7 @@ The provider clients also have a dependency on an `HttpClient` implementation to
400
400
401
401
For example, if we know we are going to run this code in NodeJS, we can utilize the `NodeHttpClient` module from `@effect/platform-node` to provide an `HttpClient` implementation:
0 commit comments