Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion docs/guides/global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "10.*-preview"
"allowPrerelease": true
}
}
8 changes: 4 additions & 4 deletions docs/guides/text/chat/chat_instructions.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SAMPLE: Generate text with messages using different roles
// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start
#:package OpenAI@2.2.*-*
#:property PublishAot false
// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start
#:package OpenAI@2.*
#:property PublishAot=false

using OpenAI.Chat;
using OpenAI.Chat;

string key = Environment.GetEnvironmentVariable("OPENAI_API_KEY")!;
ChatClient client = new("gpt-4.1", key);
Expand Down
10 changes: 6 additions & 4 deletions docs/guides/text/chat/chat_roles.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// SAMPLE: Generate text with messages using different roles
// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start
#:package [email protected].*-*
#:property PublishAot false
// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start
#pragma warning disable OPENAI001

using OpenAI.Chat;
#:package OpenAI@2.*
#:property PublishAot=false

using OpenAI.Chat;

string key = Environment.GetEnvironmentVariable("OPENAI_API_KEY")!;
ChatClient client = new("gpt-4.1", key);
Expand Down
8 changes: 4 additions & 4 deletions docs/guides/text/chat/chat_simpleprompt.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SAMPLE: Generate text from a simple prompt
// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start
#:package OpenAI@2.2.*-*
#:property PublishAot false
// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start
#:package OpenAI@2.*
#:property PublishAot=false

using OpenAI.Chat;
using OpenAI.Chat;

string key = Environment.GetEnvironmentVariable("OPENAI_API_KEY")!;
ChatClient client = new("gpt-4.1", key);
Expand Down
8 changes: 4 additions & 4 deletions docs/guides/text/chat/chat_tools.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SAMPLE: Generate text from a simple prompt
// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start
#:package OpenAI@2.2.*-*
// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start
#:package OpenAI@2.*
#:property PublishAot=false

using OpenAI.Chat;
using OpenAI.Chat;

string key = Environment.GetEnvironmentVariable("OPENAI_API_KEY")!;
ChatClient client = new("gpt-4.1", key);
Expand All @@ -15,7 +15,7 @@
functionParameters: BinaryData.FromObjectAsJson(new
{
type = "object",
properties = new
properties = new
{
utc = new
{
Expand Down
8 changes: 5 additions & 3 deletions docs/guides/text/responses/responses_fileinput.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// SAMPLE: Prompt template with file input variable
// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start
#:package [email protected].*-*
#:property PublishAot false
// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start
#pragma warning disable OPENAI001

#:package OpenAI@2.*
#:property PublishAot=false

using OpenAI.Responses;
using OpenAI.Files;
Expand Down
10 changes: 6 additions & 4 deletions docs/guides/text/responses/responses_instructions.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// SAMPLE: Generate text with instructions
// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start
#:package [email protected].*-*
#:property PublishAot false
// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start
#pragma warning disable OPENAI001

using OpenAI.Responses;
#:package OpenAI@2.*
#:property PublishAot=false

using OpenAI.Responses;

string key = Environment.GetEnvironmentVariable("OPENAI_API_KEY")!;
OpenAIResponseClient client = new("gpt-4.1", key);
Expand Down
8 changes: 5 additions & 3 deletions docs/guides/text/responses/responses_prompttemplate.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// SAMPLE: Generate text with a prompt template
// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start
#:package [email protected].*-*
#:property PublishAot false
// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start
#pragma warning disable OPENAI001

#:package OpenAI@2.*
#:property PublishAot=false

using OpenAI.Responses;
using System.ClientModel;
Expand Down
10 changes: 6 additions & 4 deletions docs/guides/text/responses/responses_roles.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// SAMPLE: Generate text with messages using different roles
// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start
#:package [email protected].*-*
#:property PublishAot false
// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start
#pragma warning disable OPENAI001

using OpenAI.Responses;
#:package OpenAI@2.*
#:property PublishAot=false

using OpenAI.Responses;

string key = Environment.GetEnvironmentVariable("OPENAI_API_KEY")!;
OpenAIResponseClient client = new("gpt-4.1", key);
Expand Down
10 changes: 6 additions & 4 deletions docs/guides/text/responses/responses_simpleprompt.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// SAMPLE: Generate text from a simple prompt
// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start
#:package [email protected].*-*
#:property PublishAot false
// GUIDANCE: Instructions to run this code: https://aka.ms/oai/net/start
#pragma warning disable OPENAI001

using OpenAI.Responses;
#:package OpenAI@2.*
#:property PublishAot=false

using OpenAI.Responses;

string key = Environment.GetEnvironmentVariable("OPENAI_API_KEY")!;
OpenAIResponseClient client = new("gpt-4.1", key);
Expand Down