File size: 3,073 Bytes
ab01137
 
dda94e6
 
 
 
 
ab01137
dda94e6
8278129
 
 
 
ab01137
8278129
ab01137
 
8278129
 
ab01137
 
 
8278129
 
 
ab01137
8278129
 
ab01137
 
8278129
 
ab01137
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dda94e6
8278129
dda94e6
 
ab01137
dda94e6
8278129
 
 
 
 
 
dda94e6
ab01137
dda94e6
8278129
 
 
 
 
dda94e6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
guess_word = {"name": "guess_word",
                  "description": "Use this function to check if a guessed word is the correct answer or not, and if incorrect, calculate a score and a rank of the guess word.",
                  "parameters": {
                      "type": "object",
                      "properties": {
                          "word": {
                              "type": "string",
                              "description": "A single Japanese word to guess, which is can be a noun, verb, adverb or adjective. e.g. 空, 近い, 行く, etc."
                              },
                        #   "puzzle_num": {
                        #       "type": "integer",
                        #       "description": "An index indicating today's puzzle."
                        #   }
                      },
                      "required": ["word"]
                  }}

lookup_answer = {"name": "lookup_answer",
                "description": "Use this function to check the correct answer of today's puzzle.",
                "parameters": {
                    "type": "object",
                    "properties": {
                        # "puzzle_num": {
                        #     "type": "integer",
                        #     "description": "An index indicating today's puzzle."
                        }
                    # },
                    # "required": ["puzzle_num"]
                }}

retrieve_puzzle_num = {"name": "retrieve_puzzle_num",
                  "description": "Use this function to retrieve today's puzzle number.",
                  "parameters": {
                      "type": "object",
                      "properties": {}
                  },
                  }

update_history = {"name": "update_history",
                  "description": "Use this function to add current guess to a table for a user's guess history.",
                  "parameters": {
                      "type": "object",
                      "properties": {
                          "current_guess": {
                              "type": "json",
                              "description": "A currently guessed word and its score and rank."
                          },
                          "guess_history": {
                              "type": "object",
                              "description": "A dataframe containing the guessed words and its score and rank in a row."
                          }
                      },
                      "required": ["current_guess", "guess_history"]
                  }}
read_rule = {"name": "read_rule",
                 "description": "Use this function to read the game rule for clarification of your response.",
                 "parameters": {
                     "type": "object",
                     "properties": {},
                 }}


def get_functions():
    functions = [guess_word, 
                 lookup_answer, 
                #  retrieve_puzzle_num, 
                #  update_history, 
                 read_rule]
    return functions