You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: main.go
    path of file: ./repos/dotenx/predefinedImages/tasks/open-ai-create-instagram-post
    
    the code of the file until where you have to start completion: // image: dotenx/task-and-trigger:open-ai-create-instagram-post-lambda2
package main

import (
	"bytes"
	"context"
	
    
func HandleLambdaEvent(event Event) (Response, error) {
	fmt.Println("event.Body:", event.Body)
	resp := Response{}
	resp.Successfull = true
	singleInput := event.Body
	apiKey := singleInput["INTEGRATION_API_KEY"].(string)
	explanation := fmt.Sprint(singleInput["explanation"])
	keywords := fmt.Sprint(singleInput["keywords"])

	// api reference: https://platform.openai.com/docs/api-reference/chat/create
	chatCompletionUrl := "https://api.openai.com/v1/chat/completions"
	chatCompletionHeaders := []Header{
		{
			Key:   "Authorization",
			Value: fmt.Sprintf("Bearer %s", apiKey),
		},
		{
			Key:   "Content-Type",
			Value: "application/json",
		},
	}
	prompt := fmt.Sprintf("Write an Instagram post about the following content:\n%s\nThis post should be written based on SEO techniques and should be about these keywords: %s\nAnd also based on Instagram limitations the output should has at most 2200 characters.", explanation, keywords)
	fmt.Println("Prompt:", prompt)
	chatCompletionBody := map[string]interface{}{
		"model": "gpt-3.5-turbo",
		"messages": []map[string]interface{}{
			{
				"role":    "user",
				"content": prompt,
			},
		},
	}
	chatCompletionBodyBytes, _ := json.Marshal(chatCompletionBody)
	out, statusCode, _, err := httpRequest(http.MethodPost, chatCompletionUrl, bytes.NewBuffer(chatCompletionBodyBytes), chatCompletionHeaders, 0)
	fmt.Println("Open AI api status code:", statusCode)
	fmt.Println("Open AI api response (send prompt):", string(out))
	if err != nil || (statusCode != http.StatusOK && statusCode != http.StatusCreated) {
		fmt.Printf("can't get correct response from Open AI api")
		resp.Successfull = false
	}
	if err != nil || statusCode != http.StatusOK {
		if err == nil {
			err = errors.New("request to Open AI api wasn't successful")
		}
		fmt.Println(err)
		resp.Successfull = false
	}

	var chatCompletionResponse struct {
		Id      string                   `json:"id"`
		Object  string                   `json:"object"`
		Model   string                   `json:"model"`
		Created int64                    `json:"created"`
		Usage   map[string]interface{}   `json:"usage"`
		Choices []map[string]interface{} `json:"choices"`
	}
	err = json.Unmarshal(out, &chatCompletionResponse)
	if err != nil {
		fmt.Println(err)
		resp.Successfull = false
	}

	resp.ReturnValue = map[string]interface{}{
		"outputs": chatCompletionResponse,
	}
	if resp.Successfull {
		resp.Status = "completed"
		fmt.Println("Prompt was sent successfully")
	} else {
		resp.Status = "failed"
		fmt.Println("Prompt can't be sent successfully")
	}
	return resp, nil
}