Skip to content

Commit

Permalink
AI_POC added
Browse files Browse the repository at this point in the history
  • Loading branch information
Roland-Lannuzel committed Oct 1, 2024
1 parent 243ff1b commit 74cc1fa
Show file tree
Hide file tree
Showing 32 changed files with 560 additions and 0 deletions.
Binary file added Project/Sources/Forms/D_Chat/Images/Gears.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions Project/Sources/Forms/D_Chat/ObjectMethods/Button.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var $aiParameters : Object

$aiParameters:=New object:C1471

$aiParameters.apiKey:=Form:C1466.apiKey
$aiParameters.windowID:=Form:C1466.windowID

$aiParameters.function:=Form:C1466.ddownList.values[Form:C1466.ddownList.index]
$aiParameters.prompt:=Form:C1466.prompt

Form:C1466.answer:=""
OBJECT SET VISIBLE:C603(*; "waitGears"; True:C214)
AI Call($aiParameters)


6 changes: 6 additions & 0 deletions Project/Sources/Forms/D_Chat/ObjectMethods/Button10.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

If (Shift down:C543)
Form:C1466.prompt:="Generate an advertising for the new book “Have fun gardening”"
Else
Form:C1466.prompt:="Génère une publicité pour le nouveau livre ”Jardinez en vous amusant”"
End if
20 changes: 20 additions & 0 deletions Project/Sources/Forms/D_Chat/ObjectMethods/Button2.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//var $aiSignal : 4D.Signal
//var $done : Boolean


//$aiSignal:=New signal("Call AI")
//Use ($aiSignal)
//$aiSignal.apiKey:=Form.apiKey
//$aiParameters.windowID:=Form.windowID

//$aiSignal.function:="Reset context"
//End use

//AI Call($aiSignal)
//$done:=$aiSignal.wait(5)
//If ($done)
//ALERT("Done")
//Else
//ALERT("no anwser")
//End if

5 changes: 5 additions & 0 deletions Project/Sources/Forms/D_Chat/ObjectMethods/Button3.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
If (Shift down:C543)
Form:C1466.prompt:="Generate a formal invitation for the \"World Motor Show\" 2025"
Else
Form:C1466.prompt:="Génère une invitation formelle pour le \"Mondial de l'automobile\" 2025"
End if
5 changes: 5 additions & 0 deletions Project/Sources/Forms/D_Chat/ObjectMethods/Button4.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
If (Shift down:C543)
Form:C1466.prompt:="Generate a funny invitation for the wedding of PAUL and VIRGINIE"
Else
Form:C1466.prompt:="Génère une invitation de mariage amusante pour le mariage de PAUL et VIRGINIE"
End if
6 changes: 6 additions & 0 deletions Project/Sources/Forms/D_Chat/ObjectMethods/Button5.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
If (Shift down:C543)
Form:C1466.prompt:="Generate geek invitation for the hi-tech show 2025"
Else
Form:C1466.prompt:="Génère invitation spécial geek pour le salon hi-tech 2025"
End if

6 changes: 6 additions & 0 deletions Project/Sources/Forms/D_Chat/ObjectMethods/Button6.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

If (Shift down:C543)
Form:C1466.prompt:="Generate a formal invitation for lawers congress of Chicago"
Else
Form:C1466.prompt:="Génère a invitation formelle pour le salon des avocats d'Aix-en-Provence"
End if
14 changes: 14 additions & 0 deletions Project/Sources/Forms/D_Chat/ObjectMethods/Button7.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var $aiParameters : Object

$aiParameters:=New object:C1471

$aiParameters.apiKey:=Form:C1466.apiKey
$aiParameters.windowID:=Form:C1466.windowID

$aiParameters.function:=Form:C1466.ddownList.values[Form:C1466.ddownList.index]
$aiParameters.prompt:=Form:C1466.prompt

OBJECT SET VISIBLE:C603(*; "waitText"; True:C214)
AI Call($aiParameters)


6 changes: 6 additions & 0 deletions Project/Sources/Forms/D_Chat/ObjectMethods/Button9.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

If (Shift down:C543)
Form:C1466.prompt:="Generates an invitation to the opening of the “Maxi-DYI\\” store."
Else
Form:C1466.prompt:="Génère une invitation à l'inauguration du magasin de bricolage “MaxiBricolle“"
End if
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SET TIMER:C645(-1)
1 change: 1 addition & 0 deletions Project/Sources/Forms/D_Chat/ObjectMethods/WParea.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
WP UpdateWidget ("WPtoolbar";"WParea")
Loading

0 comments on commit 74cc1fa

Please sign in to comment.