Sunday, October 15, 2023
HomeiOS DevelopmentCan not name worth of non-function sort 'CompletionsWrapper'

Can not name worth of non-function sort ‘CompletionsWrapper’


that is the code

import SwiftUI
import Basis
import UIKit
import OpenAI

class ViewController: UIViewController {
    
    @IBOutlet weak var inputTextField: UITextField!
    @IBOutlet weak var outputTextView: UITextView!
    
    let openAI = strive! OpenAI(apiKey: "myAPIkeyCodeIwillNotShare")
 
    @IBAction func sendMessage(_ sender: Any) {
        let immediate = inputTextField.textual content ?? ""
        let completions = strive! openAI.completions(immediate: immediate, maxTokens: 150)
        let response = completions.decisions[0].textual content
        outputTextView.textual content += "nAI: (response)"
        inputTextField.textual content = ""
    }
}

it gave me the error above. what ought to i do ?

i attempted every thing i may



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments