mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
.NET Workflows - Clean-up declarative docs and product-context. (#1134)
* Clean-up * Rollback sample --------- Co-authored-by: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com>
This commit is contained in:
@@ -101,7 +101,9 @@ internal sealed class Program
|
||||
DeclarativeWorkflowOptions options =
|
||||
new(new AzureAgentProvider(this.FoundryEndpoint, new AzureCliCredential()))
|
||||
{
|
||||
Configuration = this.Configuration
|
||||
Configuration = this.Configuration,
|
||||
//ConversationId = null, // Assign to continue a conversation
|
||||
//LoggerFactory = null, // Assign to enable logging
|
||||
};
|
||||
|
||||
return DeclarativeWorkflowBuilder.Build<string>(this.WorkflowFile, options);
|
||||
|
||||
@@ -16,9 +16,12 @@ You can also use environment variables if you prefer.
|
||||
To set your secrets as an environment variable (PowerShell):
|
||||
|
||||
```pwsh
|
||||
$env:AZURE_FOUNDRY_PROJECT_ENDPOINT="https://..."
|
||||
$env:FOUNDRY_PROJECT_ENDPOINT="https://..."
|
||||
```
|
||||
|
||||
etc...
|
||||
|
||||
|
||||
To set your secrets with .NET Secret Manager:
|
||||
|
||||
1. From the root of the repository, navigate the console to the project folder:
|
||||
@@ -48,7 +51,13 @@ To set your secrets with .NET Secret Manager:
|
||||
5. Define setting that identifies your Azure Foundry Model Deployment (endpoint):
|
||||
|
||||
```
|
||||
dotnet user-secrets set "FOUNDRY_MODEL_DEPLOYMENT_NAME" "https://..."
|
||||
dotnet user-secrets set "FOUNDRY_MODEL_DEPLOYMENT_NAME" "gpt-4.1"
|
||||
```
|
||||
|
||||
6. Define setting that identifies your Bing Grounding connection:
|
||||
|
||||
```
|
||||
dotnet user-secrets set "FOUNDRY_CONNECTION_GROUNDING_TOOL" "mybinggrounding"
|
||||
```
|
||||
|
||||
#### Authorization
|
||||
@@ -67,7 +76,7 @@ The sample workflows rely on agents defined in your Azure Foundry Project.
|
||||
To create agents, run the [`Create.ps1`](../../../../../workflow-samples/setup/) script.
|
||||
This will create the agents used in the sample workflows in your Azure Foundry Project and format a script you can copy and use to configure your environment.
|
||||
|
||||
> Note: `Create.ps1` relies upon the `FOUNDRY_PROJECT_ENDPOINT` and `FOUNDRY_MODEL_DEPLOYMENT_NAME` settings.
|
||||
> Note: `Create.ps1` relies upon the `FOUNDRY_PROJECT_ENDPOINT`, `FOUNDRY_MODEL_DEPLOYMENT_NAME`, and `FOUNDRY_CONNECTION_GROUNDING_TOOL` settings.
|
||||
|
||||
## Execution
|
||||
|
||||
|
||||
@@ -30,7 +30,12 @@ internal sealed class Program
|
||||
Stopwatch timer = Stopwatch.StartNew();
|
||||
|
||||
// Use DeclarativeWorkflowBuilder to generate code based on a YAML file.
|
||||
string code = DeclarativeWorkflowBuilder.Eject(this.WorkflowFile, DeclarativeWorkflowLanguage.CSharp, workflowNamespace: "Demo.DeclarativeCode", workflowPrefix: "Sample");
|
||||
string code =
|
||||
DeclarativeWorkflowBuilder.Eject(
|
||||
this.WorkflowFile,
|
||||
DeclarativeWorkflowLanguage.CSharp,
|
||||
workflowNamespace: "Demo.DeclarativeCode",
|
||||
workflowPrefix: "Sample");
|
||||
|
||||
Notify($"\nWORKFLOW: Defined {timer.Elapsed}\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user