Created
September 17, 2023 08:15
-
-
Save berpj/c42e73d40a62a1932e40432e16d5dc91 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
response = OPENAI_CLIENT.chat( | |
parameters: { | |
model: "gpt-4-0613", # Required. | |
messages: [ | |
{ role: "system", content: "Tu es un expert en aviation et OSINT. Je vais te donner des données ADS-B que tu vas interpréter afin de déterminer le type de vol ou de mission dont il s'agit. Utilise uniquement la fonction sortie."}, | |
{ role: "user", content: self.traces.last.to_json } | |
], | |
functions: [ | |
{ | |
name: "sortie", | |
description: "Formate une analyse de données ADSB", | |
parameters: { | |
type: :object, | |
properties: { | |
courte_analyse: { | |
type: :string, | |
}, | |
est_un_planeur: { | |
type: "boolean", | |
}, | |
est_un_vol_commercial: { | |
type: "boolean", | |
}, | |
type_de_vol: { | |
type: "string", | |
description: "Résume très brièvement le type de vol dont il s'agit, par exemple `Vol commercial`, `Vol de loisir`, `Vol privé`, `Vol militaire`, `Vol d'entrainement militaire`, `Vol d'entrainement`, `Vol de surveillance`, `Vol de surveillance / photo`, `Vol d'essai`, `Vol de recherche et de sauvetage`, etc." | |
} | |
}, | |
required: ["courte_analyse", "est_un_planeur", "est_un_vol_commercial", "type_de_vol"], | |
}, | |
}, | |
], | |
temperature: 0.7, | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment