Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Change the typing for the LDAIConfig. #688

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

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.

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.

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

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

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.

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.

1 participant