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
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"Slug": "systemone-v1-systemone-post",
"Description": "Answer one or more questions about the content supplied in \u0060state\u0060.\n\nYou can mix question types in one request. Answers use the same names as the\nquestions, so you can match each result to its question. The response also includes\nthe model used and token usage.",
"Language": "csharp",
"Code": "using var client = RawTypeSafeClient.CreateFromEnvironment();\n\nvar request = global::System.Text.Json.JsonSerializer.Deserialize\u003Cglobal::TypeSafeAI.Generated.SystemOneRequest\u003E(\n @\u0022{\n \u0022\u0022model\u0022\u0022: \u0022\u0022v14_hot_mode\u0022\u0022,\n \u0022\u0022state\u0022\u0022: \u0022\u0022photo\u0022\u0022,\n \u0022\u0022questions\u0022\u0022: {\n \u0022\u0022red_rectangle\u0022\u0022: {\n \u0022\u0022type\u0022\u0022: \u0022\u0022box\u0022\u0022,\n \u0022\u0022instructions\u0022\u0022: \u0022\u0022Locate the red rectangle.\u0022\u0022\n }\n },\n \u0022\u0022assets\u0022\u0022: {\n \u0022\u0022photo\u0022\u0022: {\n \u0022\u0022type\u0022\u0022: \u0022\u0022image\u0022\u0022,\n \u0022\u0022format\u0022\u0022: \u0022\u0022png\u0022\u0022,\n \u0022\u0022data_base64\u0022\u0022: \u0022\u0022iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAHElEQVR4nGP4TyJgoKcGBgbsaFQDfTUQB4aDBgDAen2fpitsVAAAAABJRU5ErkJggg==\u0022\u0022\n }\n }\n}\u0022)!;\n\nvar response = await client.SystemoneV1SystemonePostAsync(\n request: request,\n typeSafeDangerZoneImages: global::TypeSafeAI.Generated.SystemoneV1SystemonePostTypeSafeDangerZoneImages.True,\n typeSafeDangerZoneLongContext: global::TypeSafeAI.Generated.SystemoneV1SystemonePostTypeSafeDangerZoneLongContext.True\n);\n\n// Example response:\n// {\n// \u0022model\u0022: \u0022v14_hot_mode\u0022,\n// \u0022answers\u0022: {\n// \u0022red_rectangle\u0022: {\n// \u0022type\u0022: \u0022box\u0022,\n// \u0022box\u0022: {\n// \u0022top\u0022: 0.2,\n// \u0022bottom\u0022: 0.66,\n// \u0022left\u0022: 0.19,\n// \u0022right\u0022: 0.68\n// },\n// \u0022confidence\u0022: null\n// }\n// },\n// \u0022usage\u0022: {\n// \u0022input_tokens\u0022: 285,\n// \u0022output_tokens\u0022: 20\n// }\n// }",
"Code": "using var client = RawTypeSafeClient.CreateFromEnvironment();\n\nvar request = global::System.Text.Json.JsonSerializer.Deserialize\u003Cglobal::TypeSafeAI.Generated.SystemOneRequest\u003E(\n @\u0022{\n \u0022\u0022model\u0022\u0022: \u0022\u0022jev-preview\u0022\u0022,\n \u0022\u0022state\u0022\u0022: \u0022\u0022photo\u0022\u0022,\n \u0022\u0022questions\u0022\u0022: {\n \u0022\u0022red_rectangle\u0022\u0022: {\n \u0022\u0022type\u0022\u0022: \u0022\u0022box\u0022\u0022,\n \u0022\u0022instructions\u0022\u0022: \u0022\u0022Locate the red rectangle.\u0022\u0022\n }\n },\n \u0022\u0022assets\u0022\u0022: {\n \u0022\u0022photo\u0022\u0022: {\n \u0022\u0022type\u0022\u0022: \u0022\u0022image\u0022\u0022,\n \u0022\u0022format\u0022\u0022: \u0022\u0022png\u0022\u0022,\n \u0022\u0022data_base64\u0022\u0022: \u0022\u0022iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAHElEQVR4nGP4TyJgoKcGBgbsaFQDfTUQB4aDBgDAen2fpitsVAAAAABJRU5ErkJggg==\u0022\u0022\n }\n }\n}\u0022)!;\n\nvar response = await client.SystemoneV1SystemonePostAsync(\n request: request,\n typeSafeDangerZoneImages: global::TypeSafeAI.Generated.SystemoneV1SystemonePostTypeSafeDangerZoneImages.True,\n typeSafeDangerZoneLongContext: global::TypeSafeAI.Generated.SystemoneV1SystemonePostTypeSafeDangerZoneLongContext.True\n);\n\n// Example response:\n// {\n// \u0022model\u0022: \u0022jev-preview\u0022,\n// \u0022answers\u0022: {\n// \u0022red_rectangle\u0022: {\n// \u0022type\u0022: \u0022box\u0022,\n// \u0022box\u0022: {\n// \u0022top\u0022: 0.2,\n// \u0022bottom\u0022: 0.66,\n// \u0022left\u0022: 0.19,\n// \u0022right\u0022: 0.68\n// },\n// \u0022confidence\u0022: null\n// }\n// },\n// \u0022usage\u0022: {\n// \u0022input_tokens\u0022: 285,\n// \u0022output_tokens\u0022: 20\n// }\n// }",
"Format": "sdk",
"OperationId": "systemone_v1_systemone_post",
"Setup": "This example assumes \u0060using TypeSafeAI.Generated;\u0060 is in scope and a configured credential environment variable is set: \u0060TYPESAFE_API_KEY\u0060."
Expand Down
Loading
Loading