-
-
Notifications
You must be signed in to change notification settings - Fork 6
OpenAI.FineTuneData
Andrew Lambert edited this page Jul 14, 2024
·
5 revisions
OpenAI.FineTuneData
Protected Class FineTuneData
This class can create, load, and save JSONL-based training files for the fine-tuning API. Once you have created the training file locally you can upload it using the File.Create shared method.
This example creates a new training file and uploads it for use with fine-tuning:
OpenAI.APIKey = "YOUR API KEY"
Dim file As FolderItem = SpecialFolder.Desktop.Child("example.jsonl")
Dim trainingdata As OpenAI.FineTuneData = OpenAI.FineTuneData.Create(file)
trainingdata.AddLine("You are a helpful assistant.", "What is the capital of France?", "Paris is the capital of France.")
trainingdata.AddLine("You are a helpful assistant.", "What is the capital of Germany?", "Berlin is the capital of Germany.")
trainingdata.AddLine("You are a helpful assistant.", "What is the capital of Spain?", "Madrid is the capital of Spain.")
' etc.
trainingdata.Save(file, True)
Dim trainingfile As OpenAI.File = OpenAI.File.Create(file, "fine-tune")
Wiki home | Project page | Bugs | Become a sponsor
Text and code examples are Copyright ©2023-24 Andrew Lambert, offered under the CC BY-SA 3.0 License.