Skip to content

Conversation

@paulinevos
Copy link
Contributor

Q A
Bug fix? no
New feature? no
Docs? no
License MIT

As the Vectorizer currently makes assumptions about having to pass string data to PlatformInterface::invoke, when that method can actually take about any sort of input.

Platform implementations decide what data types they can handle through their normalizers. Therefore, it should be up to platform to handle types and not up to store to decide that it should only pass strings.

@carsonbot carsonbot changed the title Support mixed for getContent method Support mixed for getContent method Oct 27, 2025
@paulinevos paulinevos force-pushed the mixed-content branch 2 times, most recently from 2287f60 to d3c8093 Compare October 28, 2025 08:27
Copy link
Member

@chr-hertel chr-hertel left a comment

Choose a reason for hiding this comment

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

Sorry for he late response, let's go with string|object here - or do we need array as well?

As the Vectorizer currently makes assumptions about having to pass
string data to `PlatformInterface::invoke`, when that method can
actually take about any sort of input.

`Platform` implementations decide what data types they can handle
through their normalizers. Therefore, it should be up to `platform` to
handle types and not up to `store` to decide that it should only pass
strings.
Comment on lines -21 to 29

final readonly class Vectorizer implements VectorizerInterface
final class Vectorizer implements VectorizerInterface
{
public function __construct(
private PlatformInterface $platform,
private string $model,
private LoggerInterface $logger = new NullLogger(),
private readonly PlatformInterface $platform,
private readonly string $model,
private readonly LoggerInterface $logger = new NullLogger(),
) {
}
Copy link
Member

Choose a reason for hiding this comment

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

a bit confused about this diff, since it is already fixed on main with #829

final class Vectorizer implements VectorizerInterface
{
public function __construct(
private readonly PlatformInterface $platform,
private readonly string $model,
private readonly LoggerInterface $logger = new NullLogger(),
) {
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah weird, I'll try rebase although that shouldn't have any bearing on this diff... Maybe GH being buggy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants