Skip to content

retrieveJsonLine(__with_apiKey_)

MarcoDotIO edited this page Dec 5, 2022 · 1 revision

retrieveJsonLine(_:with:apiKey:)

Used for parsing .jsonl files when retrieving fine-tuning files from OpenAI's server.

public func retrieveJsonLine<T: Decodable>(
        _ type: T.Type = T.self,
        with url: URL,
        apiKey: String? = nil
    )

Parameters

  • type: The type of T that the data will decode to.
  • with: The input url of type URL that will be fetched.
  • apiKey: The API Key for use with the server.

Returns

The decoded object of array type T.

Types
Global Functions
Clone this wiki locally