-
Notifications
You must be signed in to change notification settings - Fork 0
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
Updates to Python tracking #3
Conversation
|
||
class LDAIClient: | ||
"""The LaunchDarkly AI SDK client object.""" | ||
|
||
def __init__(self, client: LDClient): | ||
self.client = client | ||
|
||
def model_config(self, key: str, context: Context, default_value: str, variables: Optional[Dict[str, Any]] = None) -> Any: | ||
def model_config(self, key: str, context: Context, default_value: str, variables: Optional[Dict[str, Any]] = None) -> AIConfig: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this is returning a dictionary, not an AIConfig
type.
Also just noticed there is a rogue print in there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@keelerm84 updated the logic to return an AIConfig
Remove tracking utils return AI Config Remove errant print
from typing import Callable, TypedDict | ||
from dataclasses import dataclass | ||
|
||
@dataclass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't typically see both @dataclass
and TypedDict
used together. Are both of these needed? If so, why not on the other types below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@keelerm84 this is a lack of knowledge on my part. I switched them over to dataclasses in the following commit.
variationDetail
which generates an event each time tovariation
.