Skip to content

Commit 9581926

Browse files
authored
.NET: Correct endpoint override instructions in Responses samples (#9639)
1 parent 9c53b5f commit 9581926

4 files changed

Lines changed: 8 additions & 5 deletions

File tree

‎dotnet/samples/04-hosting/af-hosting/local_responses/Server/Program.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static string LookupWeather([Description("The city to look up weather for.")] st
113113
});
114114

115115
// Bind to a fixed local URL so the paired client sample has a deterministic default.
116-
// Override with the ASPNETCORE_URLS environment variable when needed.
116+
// To use a different address, change the URL below and set RESPONSES_SERVER_URL in the client.
117117
app.Run("http://localhost:5000");
118118

119119
// Application-owned trust decision. Replace with real authentication + authorization: verify the caller,

‎dotnet/samples/04-hosting/af-hosting/local_responses/Server/README.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ The route persists each turn under a continuation id chosen by how the caller co
2525
under the newly minted response id, so a later `previous_response_id` can branch from that exact point and
2626
two branches from the same prior response stay independent.
2727

28-
The agent has a deterministic `lookup_weather` tool. Binds to `http://localhost:5000` (override with
29-
`ASPNETCORE_URLS`).
28+
The agent has a deterministic `lookup_weather` tool. Binds to `http://localhost:5000`. To use a different address,
29+
change the URL passed to `app.Run` in `Program.cs` and set `RESPONSES_SERVER_URL` to the same address
30+
in the client shell.
3031

3132
```bash
3233
export FOUNDRY_PROJECT_ENDPOINT="https://<your-resource>.services.ai.azure.com/api/projects/<your-project>"

‎dotnet/samples/04-hosting/af-hosting/local_responses_workflow/Server/Program.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static Workflow BuildWorkflow(AIAgent writer)
118118
});
119119

120120
// Bind to a fixed local URL so the paired client sample has a deterministic default.
121-
// Override with the ASPNETCORE_URLS environment variable when needed.
121+
// To use a different address, change the URL below and set RESPONSES_SERVER_URL in the client.
122122
app.Run("http://localhost:5001");
123123

124124
// Flattens the Responses input messages into a single brief string for the workflow's start executor.

‎dotnet/samples/04-hosting/af-hosting/local_responses_workflow/Server/README.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ This server supports **`previous_response_id` continuation only** and **rejects
1111
with HTTP 400**. Because `previous_response_id` rotates every turn, the app owns a cursor that maps each
1212
response id to the stable workflow session id, so the whole rotating chain resumes the same checkpointed
1313
run. The first turn runs the workflow forward; later turns restore the latest checkpoint and run forward
14-
with the new brief. Binds to `http://localhost:5001` (override with `ASPNETCORE_URLS`).
14+
with the new brief. Binds to `http://localhost:5001`. To use a different address,
15+
change the URL passed to `app.Run` in `Program.cs` and set `RESPONSES_SERVER_URL` to the same address
16+
in the client shell.
1517

1618
`HostedWorkflowState` is constructed with a **workflow factory** and `cacheWorkflow: false` (the default,
1719
shown explicitly), so it builds a fresh workflow instance for every run. This lets independent sessions run

0 commit comments

Comments
 (0)