Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Configuration settings (technical)

...

Reference in Code

ImageUpload

(Tool) Definition

Code Block
languagejson
{
    "type": "function",
    "function": {
      "name": "ImageUpload",
      "parameters": {
        "type": "object",
        "required": [
          "query",
          "conversation_history"
        ],
        "properties": {
          "query": {
            "type": "string",
            "description": "Smart query based on the user request but augmented with the context of conversation if needed."
          },
          "image_name": {
            "type": "string",
            "description": "Name of the image file to be analyzed [Optional]."
          },
          "conversation_history": {
            "type": "string",
            "description": "Summary of the history of the conversation to provide context for the query."
          }
        }
      },
      "description": "This tool is designed to analyze, extract, and summarize information from images. It should be invoked whenever the user inquires about images."
    }
}

Configuration

Global structure of config

Parameter

Description

languageModel: string

used GPT model

Default: AZURE_GPT_4_32K_0613

chatHistory

Instance of service

supportedExtensions: list[string]

List of supported image extensions.

Default:

[".jpg",".jpe",".jpeg",".png",".gif",".bmp"]

chatHistory

Parameter

Description

enabled: bool

Whether to use full conversation history. If False, attempt to use conversation summary from tool call.

Default: true

maxMessages: integer

Max history messages to consider

Default: 10

useModelTokenLimit: bool

Whether to use model token limit or not

Default: true

defaultTokenLimit: integer

Default token limit if model token limit is not available.

Default: 4096

percentageOfMaxTokens: float

Upper limit of tokens to keep from history.

Default: 0.5

Example Json

...

Code Block
languagejson
{
  "ImageUploadConfig": {
    "chatHistory": {
      "enabled": true,
      "maxMessages": 10
    },
    "languageModel": "AZURE_GPT_4o_2024_0513"
  }
}

Template Json Config (for developers)

Code Block
languagejson
{
  "ImageUploadConfig": {
  "supportedExtensions" : [
        ".jpg",
        ".jpe",
        ".jpeg",
        ".png",
        ".gif",
        ".bmp"
    ],
    "chatHistory": {
      "enabled": true,
      "maxMessages": 10,
      "useModelTokenLimit": true,
      "defaultTokenLimit": 4096,
      "percentageOfMaxTokens": 0.5 
    },
    "languageModel": "AZURE_GPT_4o_2024_0513"
  }
}

...