You can start querying the finetuned model by replacing the model name in your existing OpenAI code with the finetuned model. Here is a simple example:

  1. Get the ID of the finetuned model from the dashboard. The highlighted part in the clip below is the MODEL_NAME_FROMCONSOLE.
  1. Use it in your existing code:

You start using your finetuned models by changing the API end point

Make sure that you installed gigaml sdk

python
    pip install gigaml

Here is how you can start using the finetuned model

python
  import openai, os
  from dotenv import load_dotenv
  # IMPORTING GIGA ML LIBRARY 
  from gigaml import OpenAI, GigaMlApi 

  load_dotenv('.env')

  client = OpenAI(
      api_key = os.environ.get('OPENAI_API_KEY'),

      #Initialise gigaml Client through API_KEY which can be generated via our console
      gigaml_client = GigaMlApi(token = os.environ.get("GIGAML_KEY")),
  )

  response = client.chat.completions.create(
      model = MODEL_NAME_FROMCONSOLE,
      messages = [{"role":"user", "content": "Who are you"}],
      tags = ["prod"],
      stream = True,
  )

  for chunk in response:
      print(chunk)

Note that, for querying LoRA models, there won’t be any cold start delay. If you are querying a full-finetune model, there will be a cold start delay of 10-15 seconds.