Skip to content

Commit

Permalink
chore: Add a doc section for harmonised API (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjtang1985 authored Oct 21, 2024
1 parent 0919361 commit 86c3a0f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/orchestration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,28 @@ console.log(
);
```

> [!Tip]
>
> #### Harmonized API
>
> You can switch to a different model, even from another vendor, by leveraging the harmonized API of the orchestration service.
> Here’s an example where only one line of code is changed..
>
> ```ts
> const orchestrationClient = new OrchestrationClient({
> llm: {
> // only change the model name here
> model_name: 'gemini-1.5-flash',
> model_params: { max_tokens: 50, temperature: 0.1 }
> },
> templating: {
> template: [
> { role: 'user', content: 'What is the capital of {{?country}}?' }
> ]
> }
> });
> ```
#### Passing a Message History
It is possible to provide a history of a conversation to the model.
Expand Down

0 comments on commit 86c3a0f

Please sign in to comment.