Versions Compared

Key

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

...

Answer to the question based on the image and conversation history.

Configuration settings (technical)

...

Settings (technical)

Reference in Code

ImageUpload

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
{
 
  "typeImageUploadConfig": "function",{
    "functionchatHistory": {
      "nameenabled": "ImageUpload"true,
      "parametersmaxMessages": 10
{    },
    "typelanguageModel": "object",
 AZURE_GPT_4o_2024_0513"
  }
}

Template Json Config (for developers)

Code Block
languagejson
{
  "ImageUploadConfig": {
  "requiredsupportedExtensions" : [
 
        "query.jpg",

         "conversation_history.jpe",
        ]".jpeg",
        "properties.png":,
{        ".gif",
    "query": {   ".bmp"
    ],
    "typechatHistory": "string", {
      "enabled": true,
      "descriptionmaxMessages": "Smart10,
query based on the user request but augmented with the context of conversation if needed."
"useModelTokenLimit": true,
      "defaultTokenLimit": 4096,
      "percentageOfMaxTokens": 0.5 
},    },
     "languageModel": "image_name": {
       AZURE_GPT_4o_2024_0513"
  }
}

(Tool) Definition

Code Block
languagejson
{
    "type": "stringfunction",
    "function": {
      "descriptionname": "ImageUpload"Name,
of the image file to be analyzed [Optional]."
 "parameters": {
         },
 "type": "object",
        "conversation_historyrequired": {
 [
          "typequery": "string",
            "descriptionconversation_history":
"Summary of the history of the conversation to provide],
context for the query."     "properties": {
    }         }
"query": {
     },       "descriptiontype": "string"This,
 tool is designed to analyze, extract, and summarize information from images. It should be invoked whenever "description": "Smart query based on the user inquiresrequest aboutbut images."augmented with the context of }
}

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 Config

Code Block
languagejson
{
  "ImageUploadConfig": {conversation if needed."
     "chatHistory": {    },
  "enabled": true,       "maxMessagesimage_name": {
  10     },     "languageModeltype": "AZURE_GPT_4o_2024_0513"string",
  }
}

Template Json Config (for developers)

Code Block
languagejson
{      "ImageUploadConfig": {   "supportedExtensionsdescription" : ["Name of the image file to be analyzed  "[Optional].jpg",
          ".jpe",},
          ".jpeg",conversation_history": {
            ".pngtype": "string",
            "description".gif: ",Summary of the history of the conversation to  ".bmpprovide context for the query."
    ],     "chatHistory": {}
      "enabled": true, }
     "maxMessages": 10},
      "useModelTokenLimitdescription": true,"This tool is designed to   "defaultTokenLimit": 4096analyze, extract, and summarize information    "percentageOfMaxTokens": 0.5 
    },
    "languageModel": "AZURE_GPT_4o_2024_0513"from images. It should be invoked whenever the user inquires about images."
    }
}

...

Author

Rami Azouz