Skip to content

Conversation

fm1320
Copy link
Contributor

@fm1320 fm1320 commented Jan 16, 2025

What does this PR do?

Fixes #<issue_number>

Before submitting
  • Was this discussed/agreed via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?

input: Optional[Any] = None,
model_kwargs: Dict = {},
model_type: ModelType = ModelType.UNDEFINED,
model_type: ModelType = ModelType.UNDEFINED, # Now required in practice
Copy link
Member

Choose a reason for hiding this comment

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

Please default to LLM

response = self.sync_client.images.edit(**api_kwargs)
else:
# Image variation
elif operation == "variation":
Copy link
Member

Choose a reason for hiding this comment

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

create_variation

response = await self.async_client.images.generate(**api_kwargs)
elif operation == "edit":
response = await self.async_client.images.edit(**api_kwargs)
elif operation == "variation":
Copy link
Member

Choose a reason for hiding this comment

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

create_variation

# args for the cache
cache_path: Optional[str] = None,
use_cache: bool = False,
model_type: ModelType = ModelType.LLM, # Add model_type parameter with default
Copy link
Member

Choose a reason for hiding this comment

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

dont update it here, let it be controled in the model client

CallbackManager.__init__(self)

self.name = name or self.__class__.__name__
self.model_type = model_type # Use the passed model_type instead of getting from client
Copy link
Member

Choose a reason for hiding this comment

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

delete this

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