Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INTM] Add new object type INTM #671

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions file-formats/intm/README.md
raghav6686 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# INTM File Format

File | Cardinality | Definition | Schema | Example
:--- | :--- | :--- | :--- | :---
`<name>.intm.json` | 1 | [`zif_aff_intm_v1.intf.abap`](./type/zif_aff_intm_v1.intf.abap) | [`intm-v1.json`](./intm-v1.json)
242 changes: 242 additions & 0 deletions file-formats/intm/intm-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
{
"$comment": "This file is autogenerated, do not edit manually, see https://github.com/SAP/abap-file-formats for more information.",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/SAP/abap-file-formats/blob/main/file-formats/intm/intm-v1.json",
"title": "Intelligent scenario Models",
"description": "This is an intelligent scenario model",
"type": "object",
"properties": {
"formatVersion": {
"title": "ABAP File Format Version",
"description": "The ABAP file format version",
"type": "string",
"const": "1"
},
"header": {
"title": "Header",
"description": "Header",
"type": "object",
"properties": {
"description": {
"title": "Description",
"description": "Description of the ABAP object",
"type": "string",
"maxLength": 60
},
"originalLanguage": {
"title": "Original Language",
"description": "Original language of the ABAP object",
"type": "string",
"minLength": 2
},
"abapLanguageVersion": {
"title": "ABAP Language Version",
"description": "ABAP language version",
"type": "string",
"enum": [
"standard",
"keyUser",
"cloudDevelopment"
],
"enumTitles": [
"Standard",
"ABAP for Key Users",
"ABAP Cloud Development"
],
"enumDescriptions": [
"Standard",
"ABAP for key user extensibility",
"ABAP cloud development"
],
"default": "standard"
}
},
"additionalProperties": false,
"required": [
"description",
"originalLanguage"
]
},
"intelligentModel": {
"title": "Intelligent Scenario Model",
"description": "This is an intelligent scenario model",
"type": "object",
"properties": {
"name": {
"title": "Model Name",
"description": "This is the model name",
"type": "string",
"maxLength": 30
},
"parent": {
"title": "Parent",
"description": "This is the parent of the model",
"type": "string",
"maxLength": 36
},
"modelType": {
"title": "Model Type",
"description": "This is the model type",
"type": "string",
"maxLength": 256
},
"adapterId": {
"title": "Adapter ID",
"description": "This is the adapter ID",
"type": "string",
"maxLength": 32
},
"nativeModelType": {
"title": "Native Model Type",
"description": "This is the native model type",
"type": "string",
"maxLength": 256
},
"modelSpecification": {
"title": "Model Content",
"description": "This is the model content",
"type": "string"
},
"modelDefinition": {
"title": "Model Definition",
"description": "This is the model definition",
"type": "string"
},
"state": {
"title": "State of model",
"description": "This is the state of the model",
"type": "string",
"maxLength": 10
},
"signature": {
"title": "Signature",
"description": "This is the model signature",
"type": "string"
},
"bindings": {
"title": "Bindings",
"description": "This is the model bindings",
"type": "string"
},
"newModel": {
"title": "Model flag",
"description": "This is the flag that indicate new model or enhancement(X)",
"type": "boolean"
},
"abapLanguageVersion": {
"title": "ABAP Language Version",
"description": "This is the abap language version",
"type": "string",
"maxLength": 1
}
},
"additionalProperties": false
},
"modelDetails": {
"title": "Model Details",
"description": "These are the model details",
"type": "object",
"properties": {
"executableId": {
"title": "Executable ID",
"description": "This is the executable ID",
"type": "string",
"maxLength": 64
},
"llmName": {
"title": "Large Language Model Name",
"description": "This is the large language model name",
"type": "string"
},
"llmModelVersion": {
"title": "LLM Model Version",
"description": "This is the LLM model version",
"type": "string",
"maxLength": 30
}
},
"additionalProperties": false
},
"segmentFields": {
"title": "Model Segment Fields",
"description": "These are the model segment fields",
"type": "array",
"items": {
"title": "Segment Fields",
"description": "These are the model segment fields",
"type": "object",
"properties": {
"fieldname": {
"title": "Table or View Field Name",
"description": "This is the field of a table or view",
"type": "string",
"maxLength": 30
},
"fieldPosition": {
"title": "Position",
"description": "This is the field position",
"type": "integer",
"minimum": -2147483648,
"maximum": 2147483647
},
"isKey": {
"title": "Key field",
"description": "This is the flag that indicates key field or not",
"type": "boolean"
}
},
"additionalProperties": false
}
},
"promptTemplates": {
"title": "Model Prompt Templates",
"description": "These are the model prompt templates",
"type": "array",
"items": {
"title": "Model Prompt Templates",
"description": "These are the model prompt templates",
"type": "object",
"properties": {
"name": {
"title": "Prompt Template Name",
"description": "This is the prompt template name",
"type": "string",
"maxLength": 30
},
"description": {
"title": "Description",
"description": "This is the description of prompt template",
"type": "string"
},
"prompt": {
"title": "Prompt",
"description": "This is the prompt",
"type": "string"
},
"promptParameters": {
"title": "Prompt Parameters",
"description": "These are the prompt parameters",
"type": "string"
},
"visible": {
"title": "Prompt Visibility",
"description": "These is the flag for the prompt visibility",
"type": "boolean"
}
},
"additionalProperties": false,
"required": [
"name",
"prompt"
]
}
}
},
"additionalProperties": false,
"required": [
"formatVersion",
"header",
"intelligentModel",
"modelDetails"
]
}
120 changes: 120 additions & 0 deletions file-formats/intm/type/zif_aff_intm_v1.intf.abap
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
INTERFACE zif_aff_intm_v1
PUBLIC.

TYPES:
"! <p class="shorttext">Intelligent Scenario Model</p>
"! This is an intelligent scenario model
BEGIN OF ty_intelligent_model,
raghav6686 marked this conversation as resolved.
Show resolved Hide resolved
"! <p class="shorttext">Model Name</p>
"! This is the model name
name TYPE c LENGTH 30,
"! <p class="shorttext">Parent</p>
"! This is the parent of the model
parent TYPE c LENGTH 36,
raghav6686 marked this conversation as resolved.
Show resolved Hide resolved
"! <p class="shorttext">Model Type</p>
"! This is the model type
model_type TYPE c LENGTH 256,
"! <p class="shorttext">Adapter ID</p>
"! This is the adapter ID
adapter_id TYPE c LENGTH 32,
"! <p class="shorttext">Native Model Type</p>
"! This is the native model type
native_model_type TYPE c LENGTH 256,
"! <p class="shorttext">Model Content</p>
"! This is the model content
model_specification TYPE string,
raghav6686 marked this conversation as resolved.
Show resolved Hide resolved
"! <p class="shorttext">Model Definition</p>
"! This is the model definition
model_definition TYPE string,
"! <p class="shorttext">State of model</p>
raghav6686 marked this conversation as resolved.
Show resolved Hide resolved
"! This is the state of the model
state TYPE c LENGTH 10,
"! <p class="shorttext">Signature</p>
"! This is the model signature
signature TYPE string,
"! <p class="shorttext">Bindings</p>
"! This is the model bindings
bindings TYPE string,
"! <p class="shorttext">Model flag</p>
raghav6686 marked this conversation as resolved.
Show resolved Hide resolved
"! This is the flag that indicate new model or enhancement(X)
new_model TYPE abap_bool,
"! <p class="shorttext">ABAP Language Version</p>
"! This is the abap language version
abap_language_version TYPE c LENGTH 1,
raghav6686 marked this conversation as resolved.
Show resolved Hide resolved
END OF ty_intelligent_model,

"! <p class="shorttext">Segment Fields</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"! <p class="shorttext">Segment Fields</p>
"! <p class="shorttext">Segment Field</p>

"! These are the model segment fields
BEGIN OF ty_segment_fields,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
BEGIN OF ty_segment_fields,
BEGIN OF ty_segment_field,

should be singular here, since it is not a table

"! <p class="shorttext">Table or View Field Name</p>
"! This is the field of a table or view
fieldname TYPE c LENGTH 30,
raghav6686 marked this conversation as resolved.
Show resolved Hide resolved
"! <p class="shorttext">Position</p>
raghav6686 marked this conversation as resolved.
Show resolved Hide resolved
"! This is the field position
field_position TYPE i,
schneidermic0 marked this conversation as resolved.
Show resolved Hide resolved
"! <p class="shorttext">Key field</p>
"! This is the flag that indicates key field or not
is_key TYPE abap_bool,
END OF ty_segment_fields,

"! <p class="shorttext">Model Prompt Templates</p>
raghav6686 marked this conversation as resolved.
Show resolved Hide resolved
"! These are the model prompt templates
BEGIN OF ty_prompt_templates,
raghav6686 marked this conversation as resolved.
Show resolved Hide resolved
"! <p class="shorttext">Prompt Template Name</p>
"! This is the prompt template name
"! $required
name TYPE c LENGTH 30,
raghav6686 marked this conversation as resolved.
Show resolved Hide resolved
"! <p class="shorttext">Description</p>
raghav6686 marked this conversation as resolved.
Show resolved Hide resolved
"! This is the description of prompt template
description TYPE string,
raghav6686 marked this conversation as resolved.
Show resolved Hide resolved
"! <p class="shorttext">Prompt</p>
"! This is the prompt
"! $required
prompt TYPE string,
"! <p class="shorttext">Prompt Parameters</p>
"! These are the prompt parameters
prompt_parameters TYPE string,
"! <p class="shorttext">Prompt Visibility</p>
"! These is the flag for the prompt visibility
visible TYPE abap_bool,
raghav6686 marked this conversation as resolved.
Show resolved Hide resolved
END OF ty_prompt_templates,

"! <p class="shorttext">Model Details</p>
"! Model Details
BEGIN OF ty_model_details,
"! <p class="shorttext">Executable ID</p>
"! This is the executable ID
executable_id TYPE c LENGTH 64,
"! <p class="shorttext">Large Language Model Name</p>
"! This is the large language model name
llm_name TYPE string,
"! <p class="shorttext">LLM Model Version</p>
"! This is the LLM model version
llm_model_version TYPE c LENGTH 30,
END OF ty_model_details,

"! <p class="shorttext">Intelligent scenario Models</p>
raghav6686 marked this conversation as resolved.
Show resolved Hide resolved
raghav6686 marked this conversation as resolved.
Show resolved Hide resolved
raghav6686 marked this conversation as resolved.
Show resolved Hide resolved
"! This is an intelligent scenario model
BEGIN OF ty_main,
"! $required
format_version TYPE zif_aff_types_v1=>ty_format_version,
"! <p class="shorttext">Header</p>
"! Header
"! $required
header TYPE zif_aff_types_v1=>ty_header_60,
"! <p class="shorttext">Intelligent Scenario Model</p>
"! This is an intelligent scenario model
"! $required
intelligent_model TYPE ty_intelligent_model,
raghav6686 marked this conversation as resolved.
Show resolved Hide resolved
"! <p class="shorttext">Model Details</p>
"! These are the model details
"! $required
model_details TYPE ty_model_details,
raghav6686 marked this conversation as resolved.
Show resolved Hide resolved
"! <p class="shorttext">Model Segment Fields</p>
"! These are the model segment fields
segment_fields TYPE STANDARD TABLE OF ty_segment_fields WITH DEFAULT KEY,
"! <p class="shorttext">Model Prompt Templates</p>
"! These are the model prompt templates
prompt_templates TYPE STANDARD TABLE OF ty_prompt_templates WITH DEFAULT KEY,
END OF ty_main.
ENDINTERFACE.
7 changes: 7 additions & 0 deletions file-formats/intm/type/zif_aff_intm_v1.intf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"formatVersion": "1",
"header": {
"description": "General types reusable in AFF",
raghav6686 marked this conversation as resolved.
Show resolved Hide resolved
"originalLanguage": "en"
}
}
Loading