Skip to content

Importing Function Definitions from the OpenAI json schema #8835

Discussion options

You must be logged in to vote

@raffaeler
You can deserialize the JSON into a model object that you provide and then convert that into the arguments required by KernelPluginFactory.CreateFromFunctions.

I tried this prompt

I have the following JSON  
{  
    "name": "GetCurrentWeather",  
    "description": "Get the current weather in a given location",  
    "parameters": {  
        "type": "object",  
        "properties": {  
            "location": {  
                "type": "string",  
                "description": "The city and state, e.g. San Francisco, CA"  
            },  
            "unit": {  
                "type": "string",  
                "enum": [ "celsius", "fahrenheit" ]  
            }  
      …

Replies: 8 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@evchaki
Comment options

Comment options

You must be logged in to vote
3 replies
@raffaeler
Comment options

@raffaeler
Comment options

@raffaeler
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@markwallace-microsoft
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by sophialagerkranspandey
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
.NET Issue or Pull requests regarding .NET code
3 participants