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

OpenAI changes Draft #2727

Draft
wants to merge 2 commits into
base: v2.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/WebJobs.Extensions.DurableTask/DurableTaskExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -456,14 +456,11 @@ void IExtensionConfigProvider.Initialize(ExtensionConfigContext context)
"For more information on extension bundles, see https://docs.microsoft.com/azure/azure-functions/functions-bindings-register#extension-bundles.");
#endif
}
else
{
// This is the older middleware implementation that is currently in use for in-process .NET
// and the older out-of-proc languages, like Node.js, Python, and PowerShell.
this.taskHubWorker.AddActivityDispatcherMiddleware(this.ActivityMiddleware);
this.taskHubWorker.AddOrchestrationDispatcherMiddleware(this.EntityMiddleware);
this.taskHubWorker.AddOrchestrationDispatcherMiddleware(this.OrchestrationMiddleware);
}

// The RPC server needs to be started sometime before any functions can be triggered
// and this is the latest point in the pipeline available to us.
Expand Down
6 changes: 6 additions & 0 deletions src/WebJobs.Extensions.DurableTask/OutOfProcMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,12 @@ public async Task CallEntityAsync(DispatchMiddlewareContext dispatchContext, Fun
FunctionName functionName = new FunctionName(entityId.EntityName);
RegisteredFunctionInfo functionInfo = this.extension.GetEntityInfo(functionName);

if (entityId.EntityName?.StartsWith("openai::", StringComparison.OrdinalIgnoreCase) ?? false)
{
await next();
return;
}

void SetErrorResult(FailureDetails failureDetails)
{
// Returns a result with no operation results and no state change,
Expand Down
Loading