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 AIConfig #16

Merged
merged 4 commits into from
Nov 15, 2024
Merged

Conversation

keelerm84
Copy link
Member

This commit inlines the AIConfigData class into the existing AIConfig.

It also introduces a new type, ModelConfig to replace the much looser dictionary config that was originally in play. This new model contains specific, typed properties for the model id, temperature, and max tokens. Additional model-specific attributes can be accessed as well.

@keelerm84 keelerm84 requested a review from a team as a code owner November 15, 2024 18:28
ldai/client.py Outdated
return self._id

@property
def temperature(self):
Copy link
Member

Choose a reason for hiding this comment

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

Do these comments need to indicate optionality?

Copy link
Member Author

Choose a reason for hiding this comment

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

I added return types to the method signatures. I think that should be sufficient.

@keelerm84 keelerm84 merged commit daf9537 into main Nov 15, 2024
11 checks passed
@keelerm84 keelerm84 deleted the mk/sdk-908/config-changes branch November 15, 2024 21:07
keelerm84 pushed a commit that referenced this pull request Nov 21, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.2.0](0.1.1...0.2.0)
(2024-11-21)


### Features

* Change the typing for the AIConfig
([#16](#16))
([daf9537](daf9537))


### Bug Fixes

* Change linting tools to dev-only dependency
([#15](#15))
([c752739](c752739))
* Verify prompt payload exists before accessing it
([#19](#19))
([d9dd21f](d9dd21f))

---
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.

2 participants