Skip to content
Merged
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: 1 addition & 2 deletions sdk/contentsafety/Azure.AI.ContentSafety/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ Please refer to [sample data](https://github.com/Azure/azure-sdk-for-net/blob/ma
#### Analyze text without blocklists

```C# Snippet:Azure_AI_ContentSafety_AnalyzeText
string datapath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Samples", "sample_data", "text.txt");
string text = File.ReadAllText(datapath);
string text = "You are an idiot";

var request = new AnalyzeTextOptions(text);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ ContentSafetyClient client = new ContentSafetyClient(new Uri(endpoint), new Azur
You can download our [sample data](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/contentsafety/Azure.AI.ContentSafety/tests/Samples/sample_data), read in the text and initialize `AnalyzeTextOptions` with it. Then call `AnalyzeText` to get analysis result.

```C# Snippet:Azure_AI_ContentSafety_AnalyzeText
string datapath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Samples", "sample_data", "text.txt");
string text = File.ReadAllText(datapath);
string text = "You are an idiot";

var request = new AnalyzeTextOptions(text);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ public void AnalyzeText()

#region Snippet:Azure_AI_ContentSafety_AnalyzeText

string datapath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Samples", "sample_data", "text.txt");
string text = File.ReadAllText(datapath);
string text = "You are an idiot";

var request = new AnalyzeTextOptions(text);

Expand Down