This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Azure.Identity; | |
using Microsoft.SemanticKernel; | |
using Microsoft.SemanticKernel.Connectors.OpenAI; | |
using OpenAI.Chat; | |
using System.Text.Json; | |
using table.lib; | |
Kernel kernel = Kernel.CreateBuilder() | |
.AddAzureOpenAIChatCompletion( | |
deploymentName: "gpt-4o", // Specify your deployment name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Azure; | |
using Azure.AI.OpenAI; | |
using Azure.AI.OpenAI.Chat; | |
using OpenAI.Chat; | |
var prompt = ".."; | |
var azureOpenaiEndpoint = "https://...openai.azure.com/"; | |
var azureOpenaiApiKey= ".."; | |
var azureOpenAiDeploymentName = ".."; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Azure; | |
using Azure.AI.OpenAI; | |
var prompt = ".."; | |
var azureOpenaiEndpoint = "https://...openai.azure.com/"; | |
var azureOpenaiApiKey= ".."; | |
var azureOpenAiDeploymentName = ".."; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# This is free and unencumbered software released into the public domain. | |
# Anyone is free to copy, modify, publish, use, compile, sell, or | |
# distribute this software, either in source code form or as a compiled | |
# binary, for any purpose, commercial or non-commercial, and by any | |
# means. | |
# In jurisdictions that recognize copyright laws, the author or authors | |
# of this software dedicate any and all copyright interest in the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// JS array equivalents to C# LINQ methods - by Dan B. | |
// Here's a simple array of "person" objects | |
var people = [ | |
{ name: "John", age: 20 }, | |
{ name: "Mary", age: 35 }, | |
{ name: "Arthur", age: 78 }, | |
{ name: "Mike", age: 27 }, | |
{ name: "Judy", age: 42 }, | |
{ name: "Tim", age: 8 } |