Create chat completions function call

non riesco a creare una request in blazor con all’interno una function call , ho provato

        var functions = new List<object>
        {
            new
            {
                name = "get_current_weather",
                description = "Get the current weather in a given location",
                parameters = new
                {
                    type = "object",
                    properties = new
                    {
                        location = new
                        {
                            type = "string",
                            description = "The city and state, e.g. San Francisco, CA"
                        },
                        unit = new
                        {
                            type = "string",
                            @enum = new[] { "celsius", "fahrenheit" }
                        }
                    },
                    required = new[] { "location" }
                }
            }
        };
        var messagess = new List<object>
        {
        new { role = "user", content = "What's the weather like in Boston today?" }
        };

        var requestData = new
        {
            model = "gpt-3.5-turbo",
            messagess,
            functions,
            function_call = "auto" // auto is default, but we'll be explicit
        };
        var jsonRequest = Newtonsoft.Json.JsonConvert.SerializeObject(requestData);

        var content = new StringContent(jsonRequest, System.Text.Encoding.UTF8, "application/json");
        
        _httpClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", _options.Value.ApiKey);
        var response = await _httpClient.PostAsJsonAsync(_options.Value.ApiUrl, requestData);

        if (response.IsSuccessStatusCode)
        {
            var responseContent = await response.Content.ReadAsStringAsync();
            Console.WriteLine(responseContent);
        }
        else
        {
            Console.WriteLine("Errore nella richiesta API OpenAI.");
        }

nel debug mi esce bad Request