Skip to content

Conversation

@kinyoklion
Copy link
Member

@kinyoklion kinyoklion commented Nov 14, 2024

Flatten the AI config moving model/prompt to the top level.
Change the LDAIDefaults to match this change.
Remove the generation config type which was the type of the config field.

Add temperature and maxTokens as optionals to the model config.
Make modelId required.

Updated the examples to include temperature and maxTokens.

SDK-912

model: aiConfig.config.model?.modelId || 'gpt-4',
messages: aiConfig.prompt || [],
model: aiConfig.model?.modelId || 'gpt-4',
temperature: aiConfig.model?.temperature ?? 0.5,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added temperature and maxTokens usage to the bedrock and OpenAI examples.

@github-actions
Copy link
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Size: 18669 bytes
Size limit: 21000

@github-actions
Copy link
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Size: 19414 bytes
Size limit: 21000

@github-actions
Copy link
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Size: 15292 bytes
Size limit: 20000

@kinyoklion
Copy link
Member Author

I have not handled the interpolation failure yet.

@kinyoklion kinyoklion marked this pull request as ready for review November 15, 2024 17:09
@kinyoklion kinyoklion requested a review from a team as a code owner November 15, 2024 17:09
@kinyoklion kinyoklion merged commit 1f3f54a into main Nov 15, 2024
23 checks passed
@kinyoklion kinyoklion deleted the rlamb/change-ai-config-structure branch November 15, 2024 17:37
@github-actions github-actions bot mentioned this pull request Nov 15, 2024
kinyoklion pushed a commit that referenced this pull request Nov 15, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>server-sdk-ai: 0.3.0</summary>

##
[0.3.0](server-sdk-ai-v0.2.1...server-sdk-ai-v0.3.0)
(2024-11-15)


### Features

* Change the typing for the LDAIConfig.
([#688](#688))
([1f3f54a](1f3f54a))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants