Skip to content

[ModelFactory] Implemented Files, Models, and Moderations factories#198

Merged
kinelski merged 2 commits into
joseharriaga:mainfrom
kinelski:factory
Aug 13, 2024
Merged

[ModelFactory] Implemented Files, Models, and Moderations factories#198
kinelski merged 2 commits into
joseharriaga:mainfrom
kinelski:factory

Conversation

@kinelski
Copy link
Copy Markdown
Collaborator

@kinelski kinelski commented Aug 9, 2024

Adding Model Factories for Files, Models, and Moderations models. These factories can be used to instantiate models for mocking.

At the moment there's no way to have the factories generated automatically since they are split across multiple namespaces.

I tried to keep them as close to generated code as possible. In case we manage to have the code generator generating them automatically for us, it would be ideal if we could keep changes to a minimum when migrating from manually-written to generated code.

@kinelski kinelski self-assigned this Aug 9, 2024
Comment thread .dotnet/src/Custom/Embeddings/OpenAIEmbeddingsModelFactory.cs
Comment thread .dotnet/tests/Embeddings/OpenAIEmbeddingsModelFactoryTests.cs
@kinelski kinelski requested a review from joseharriaga August 9, 2024 21:59
Comment thread .dotnet/src/Custom/Moderations/OpenAIModerationsModelFactory.cs Outdated
Comment thread .dotnet/src/Custom/Moderations/OpenAIModerationsModelFactory.cs Outdated
@kinelski kinelski merged commit 503b024 into joseharriaga:main Aug 13, 2024
@kinelski kinelski deleted the factory branch August 13, 2024 19:43
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