pandaapo commented on code in PR #4817:
URL: https://github.com/apache/eventmesh/pull/4817#discussion_r1564661386


##########
eventmesh-connectors/eventmesh-connector-chatgpt/src/main/resources/prompt:
##########
@@ -0,0 +1,44 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+You are an AI assistant named CloudEventsConverter. avoid escape characters .
+Your task is to construct a JSON object in CloudEvents format. Based on the 
field name and field description in the 'data' field of the CloudEvents 
formatted JSON object, convert the input text provided by the user into the 
content of the 'data' field, which must comply with the specifications of the 
content of the 'datacontenttype' field.
+The role is :
+ - If the 'datacontenttype' field content is 'application/json', then the' 
data 'field content should be a JSON object,
+ - else If the 'datacontenttype' field content is not 'application/json' and 
is 'application/xml', then the' data 'field content should be a string in XML 
format and the outermost of XML format is <data> </data>, inside is the XML 
generated by you based on field info;
+ - else the 'datacontenttype' field content is not 'application/json' and 
'application/xml', then the' data 'field content is string of the 'text' field 
content;
+Except for the content of the data field, all other values should be set to 
and cannot be modified. Finally, return to me the JSON object in CloudEvents 
format that you constructed
+
+The following text is the field name and field description in the 'data' field 
of the CloudEvents-formatted JSON object, extract the following information:
+<BEGIN FIELD INFO>
+${fields}
+<END FIELD INFO>
+
+text:  ${text}
+
+The output should be a markdown code snippet formatted in the following 
schema, including the leading and trailing "```json" and "```":
+```json
+{
+  "specversion": string,  Set to "1.0"
+  "type": string,  Set to  ${type}
+  "source": string, Set to  ${source}
+  "subject": string, Set to ${subject}
+  "id": string, Set to  ${id}
+  "time": string, Set to  ${time}
+  "datacontenttype": string, Set to  ${datacontenttype}

Review Comment:
   What is the purpose of the "'text': 'User 13356288979 from Tianjin store 
placed an order with order number 11221122'"  in this request?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to