Guide
Custom Functions(Excel)

Custome Functions for Excel

This document introduces a collection of custom functions that can be used in the Excel.

SL.ASK

  • Description: This function calls an LL model. The first parameter specifies the model to use, including gpt-3.5-turbo, gpt-4, and glm-4.
  • Custom Function Name: SL.ASK
  • Parameters:
    • model: Model to use, including gpt-3.5-turbo, gpt-4, and glm-4.
    • a: Value or cell address.
    • b: Value or cell address.
    • others: Value or cell address.
  • Returns: Content from the LL model.

Sample:

SL.ASK("gpt-3.5-turbo", A1, B1, "Your question here")
SL.ASK("gpt-4", A1, B1, "Your question here")

SL.GPT3

  • Description: This function calls the GPT3.5 model.
  • Custom Function Name: SL.GPT3
  • Parameters:
    • a: Value or cell address.
    • b: Value or cell address.
    • c: Value or cell address.
  • Returns: Content from the LL model.

Sample:

SL.GPT3(A1, B1, "Your question here")

SL.GPT4

  • Description: This function calls the GPT4 model.
  • Custom Function Name: SL.GPT4
  • Parameters:
    • a: Value or cell address.
    • b: Value or cell address.
    • c: Value or cell address.
  • Returns: Content from the LL model.

Sample:

SL.GPT4(A1, B1, "Your question here")

SL.GLM

  • Description: This function calls the GLM model.
  • Custom Function Name: SL.GLM
  • Parameters:
    • a: Value or cell address.
    • b: Value or cell address.
    • c: Value or cell address.
  • Returns: Content from the LL model.

Sample:

SL.GLM(A1, B1, "Your question here")

SL.PY

  • Description: Run Python code in Cell,the code need to have a main function.
  • Custom Function Name: SL.PY
  • Parameters:
    • code: Python code with the main function.
    • args: Values or cell addresses.
  • Returns: Result of the function.

Sample:

SL.PY("def main(a, b): return a + b", A1, B1)