Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- llava_next/lib/python3.10/site-packages/fontTools/ttLib/tables/__pycache__/F__e_a_t.cpython-310.pyc +0 -0
- llava_next/lib/python3.10/site-packages/fontTools/ttLib/tables/__pycache__/J_S_T_F_.cpython-310.pyc +0 -0
- llava_next/lib/python3.10/site-packages/fontTools/ttLib/tables/__pycache__/T_T_F_A_.cpython-310.pyc +0 -0
- llava_next/lib/python3.10/site-packages/fontTools/ttLib/tables/__pycache__/TupleVariation.cpython-310.pyc +0 -0
- llava_next/lib/python3.10/site-packages/fontTools/ttLib/tables/__pycache__/_a_n_k_r.cpython-310.pyc +0 -0
- llava_next/lib/python3.10/site-packages/fontTools/ttLib/tables/__pycache__/_f_e_a_t.cpython-310.pyc +0 -0
- llava_next/lib/python3.10/site-packages/fontTools/ttLib/tables/__pycache__/_f_p_g_m.cpython-310.pyc +0 -0
- llava_next/lib/python3.10/site-packages/fontTools/ttLib/tables/__pycache__/_k_e_r_n.cpython-310.pyc +0 -0
- llava_next/lib/python3.10/site-packages/fontTools/ttLib/tables/__pycache__/_p_r_o_p.cpython-310.pyc +0 -0
- parrot/lib/python3.10/site-packages/fire/completion_test.py +193 -0
- parrot/lib/python3.10/site-packages/fire/interact.py +99 -0
- parrot/lib/python3.10/site-packages/fire/testutils_test.py +59 -0
- parrot/lib/python3.10/site-packages/mdurl-0.1.2.dist-info/METADATA +32 -0
- parrot/lib/python3.10/site-packages/openai/types/audio/__init__.py +13 -0
- parrot/lib/python3.10/site-packages/openai/types/audio/__pycache__/__init__.cpython-310.pyc +0 -0
- parrot/lib/python3.10/site-packages/openai/types/audio/__pycache__/speech_create_params.cpython-310.pyc +0 -0
- parrot/lib/python3.10/site-packages/openai/types/audio/__pycache__/transcription.cpython-310.pyc +0 -0
- parrot/lib/python3.10/site-packages/openai/types/audio/__pycache__/transcription_create_params.cpython-310.pyc +0 -0
- parrot/lib/python3.10/site-packages/openai/types/audio/__pycache__/translation.cpython-310.pyc +0 -0
- parrot/lib/python3.10/site-packages/openai/types/audio/__pycache__/translation_create_params.cpython-310.pyc +0 -0
- parrot/lib/python3.10/site-packages/openai/types/audio/speech_create_params.py +34 -0
- parrot/lib/python3.10/site-packages/openai/types/audio/transcription.py +9 -0
- parrot/lib/python3.10/site-packages/openai/types/audio/transcription_create_params.py +52 -0
- parrot/lib/python3.10/site-packages/openai/types/audio/translation.py +9 -0
- parrot/lib/python3.10/site-packages/openai/types/audio/translation_create_params.py +44 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/__init__.py +22 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/__pycache__/__init__.cpython-310.pyc +0 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/__pycache__/message_content_image_file.cpython-310.pyc +0 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/__pycache__/message_content_text.cpython-310.pyc +0 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/__pycache__/message_create_params.cpython-310.pyc +0 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/__pycache__/message_list_params.cpython-310.pyc +0 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/__pycache__/run_create_params.cpython-310.pyc +0 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/__pycache__/run_submit_tool_outputs_params.cpython-310.pyc +0 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/__pycache__/run_update_params.cpython-310.pyc +0 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/__pycache__/thread_message.cpython-310.pyc +0 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/message_content_image_file.py +22 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/message_list_params.py +39 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/message_update_params.py +20 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/messages/__init__.py +6 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/messages/__pycache__/__init__.cpython-310.pyc +0 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/messages/__pycache__/file_list_params.cpython-310.pyc +0 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/messages/__pycache__/message_file.cpython-310.pyc +0 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/messages/file_list_params.py +41 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/messages/message_file.py +25 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/required_action_function_tool_call.py +34 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/run_create_params.py +73 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/run_submit_tool_outputs_params.py +26 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/run_update_params.py +20 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/runs/tool_calls_step_details.py +25 -0
- parrot/lib/python3.10/site-packages/openai/types/beta/threads/thread_message.py +65 -0
llava_next/lib/python3.10/site-packages/fontTools/ttLib/tables/__pycache__/F__e_a_t.cpython-310.pyc
ADDED
|
Binary file (4.56 kB). View file
|
|
|
llava_next/lib/python3.10/site-packages/fontTools/ttLib/tables/__pycache__/J_S_T_F_.cpython-310.pyc
ADDED
|
Binary file (390 Bytes). View file
|
|
|
llava_next/lib/python3.10/site-packages/fontTools/ttLib/tables/__pycache__/T_T_F_A_.cpython-310.pyc
ADDED
|
Binary file (380 Bytes). View file
|
|
|
llava_next/lib/python3.10/site-packages/fontTools/ttLib/tables/__pycache__/TupleVariation.cpython-310.pyc
ADDED
|
Binary file (21.3 kB). View file
|
|
|
llava_next/lib/python3.10/site-packages/fontTools/ttLib/tables/__pycache__/_a_n_k_r.cpython-310.pyc
ADDED
|
Binary file (772 Bytes). View file
|
|
|
llava_next/lib/python3.10/site-packages/fontTools/ttLib/tables/__pycache__/_f_e_a_t.cpython-310.pyc
ADDED
|
Binary file (870 Bytes). View file
|
|
|
llava_next/lib/python3.10/site-packages/fontTools/ttLib/tables/__pycache__/_f_p_g_m.cpython-310.pyc
ADDED
|
Binary file (1.79 kB). View file
|
|
|
llava_next/lib/python3.10/site-packages/fontTools/ttLib/tables/__pycache__/_k_e_r_n.cpython-310.pyc
ADDED
|
Binary file (7.87 kB). View file
|
|
|
llava_next/lib/python3.10/site-packages/fontTools/ttLib/tables/__pycache__/_p_r_o_p.cpython-310.pyc
ADDED
|
Binary file (390 Bytes). View file
|
|
|
parrot/lib/python3.10/site-packages/fire/completion_test.py
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (C) 2018 Google Inc.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
"""Tests for the completion module."""
|
| 16 |
+
|
| 17 |
+
from __future__ import absolute_import
|
| 18 |
+
from __future__ import division
|
| 19 |
+
from __future__ import print_function
|
| 20 |
+
|
| 21 |
+
from fire import completion
|
| 22 |
+
from fire import test_components as tc
|
| 23 |
+
from fire import testutils
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
class TabCompletionTest(testutils.BaseTestCase):
|
| 27 |
+
|
| 28 |
+
def testCompletionBashScript(self):
|
| 29 |
+
# A sanity check test to make sure the bash completion script satisfies
|
| 30 |
+
# some basic assumptions.
|
| 31 |
+
commands = [
|
| 32 |
+
['run'],
|
| 33 |
+
['halt'],
|
| 34 |
+
['halt', '--now'],
|
| 35 |
+
]
|
| 36 |
+
script = completion._BashScript(name='command', commands=commands) # pylint: disable=protected-access
|
| 37 |
+
self.assertIn('command', script)
|
| 38 |
+
self.assertIn('halt', script)
|
| 39 |
+
|
| 40 |
+
assert_template = '{command})'
|
| 41 |
+
for last_command in ['command', 'halt']:
|
| 42 |
+
self.assertIn(assert_template.format(command=last_command), script)
|
| 43 |
+
|
| 44 |
+
def testCompletionFishScript(self):
|
| 45 |
+
# A sanity check test to make sure the fish completion script satisfies
|
| 46 |
+
# some basic assumptions.
|
| 47 |
+
commands = [
|
| 48 |
+
['run'],
|
| 49 |
+
['halt'],
|
| 50 |
+
['halt', '--now'],
|
| 51 |
+
]
|
| 52 |
+
script = completion._FishScript(name='command', commands=commands) # pylint: disable=protected-access
|
| 53 |
+
self.assertIn('command', script)
|
| 54 |
+
self.assertIn('halt', script)
|
| 55 |
+
self.assertIn('-l now', script)
|
| 56 |
+
|
| 57 |
+
def testFnCompletions(self):
|
| 58 |
+
def example(one, two, three):
|
| 59 |
+
return one, two, three
|
| 60 |
+
|
| 61 |
+
completions = completion.Completions(example)
|
| 62 |
+
self.assertIn('--one', completions)
|
| 63 |
+
self.assertIn('--two', completions)
|
| 64 |
+
self.assertIn('--three', completions)
|
| 65 |
+
|
| 66 |
+
def testListCompletions(self):
|
| 67 |
+
completions = completion.Completions(['red', 'green', 'blue'])
|
| 68 |
+
self.assertIn('0', completions)
|
| 69 |
+
self.assertIn('1', completions)
|
| 70 |
+
self.assertIn('2', completions)
|
| 71 |
+
self.assertNotIn('3', completions)
|
| 72 |
+
|
| 73 |
+
def testDictCompletions(self):
|
| 74 |
+
colors = {
|
| 75 |
+
'red': 'green',
|
| 76 |
+
'blue': 'yellow',
|
| 77 |
+
'_rainbow': True,
|
| 78 |
+
}
|
| 79 |
+
completions = completion.Completions(colors)
|
| 80 |
+
self.assertIn('red', completions)
|
| 81 |
+
self.assertIn('blue', completions)
|
| 82 |
+
self.assertNotIn('green', completions)
|
| 83 |
+
self.assertNotIn('yellow', completions)
|
| 84 |
+
self.assertNotIn('_rainbow', completions)
|
| 85 |
+
self.assertNotIn('True', completions)
|
| 86 |
+
self.assertNotIn(True, completions)
|
| 87 |
+
|
| 88 |
+
def testDictCompletionsVerbose(self):
|
| 89 |
+
colors = {
|
| 90 |
+
'red': 'green',
|
| 91 |
+
'blue': 'yellow',
|
| 92 |
+
'_rainbow': True,
|
| 93 |
+
}
|
| 94 |
+
completions = completion.Completions(colors, verbose=True)
|
| 95 |
+
self.assertIn('red', completions)
|
| 96 |
+
self.assertIn('blue', completions)
|
| 97 |
+
self.assertNotIn('green', completions)
|
| 98 |
+
self.assertNotIn('yellow', completions)
|
| 99 |
+
self.assertIn('_rainbow', completions)
|
| 100 |
+
self.assertNotIn('True', completions)
|
| 101 |
+
self.assertNotIn(True, completions)
|
| 102 |
+
|
| 103 |
+
def testDeepDictCompletions(self):
|
| 104 |
+
deepdict = {'level1': {'level2': {'level3': {'level4': {}}}}}
|
| 105 |
+
completions = completion.Completions(deepdict)
|
| 106 |
+
self.assertIn('level1', completions)
|
| 107 |
+
self.assertNotIn('level2', completions)
|
| 108 |
+
|
| 109 |
+
def testDeepDictScript(self):
|
| 110 |
+
deepdict = {'level1': {'level2': {'level3': {'level4': {}}}}}
|
| 111 |
+
script = completion.Script('deepdict', deepdict)
|
| 112 |
+
self.assertIn('level1', script)
|
| 113 |
+
self.assertIn('level2', script)
|
| 114 |
+
self.assertIn('level3', script)
|
| 115 |
+
self.assertNotIn('level4', script) # The default depth is 3.
|
| 116 |
+
|
| 117 |
+
def testFnScript(self):
|
| 118 |
+
script = completion.Script('identity', tc.identity)
|
| 119 |
+
self.assertIn('--arg1', script)
|
| 120 |
+
self.assertIn('--arg2', script)
|
| 121 |
+
self.assertIn('--arg3', script)
|
| 122 |
+
self.assertIn('--arg4', script)
|
| 123 |
+
|
| 124 |
+
def testClassScript(self):
|
| 125 |
+
script = completion.Script('', tc.MixedDefaults)
|
| 126 |
+
self.assertIn('ten', script)
|
| 127 |
+
self.assertIn('sum', script)
|
| 128 |
+
self.assertIn('identity', script)
|
| 129 |
+
self.assertIn('--alpha', script)
|
| 130 |
+
self.assertIn('--beta', script)
|
| 131 |
+
|
| 132 |
+
def testDeepDictFishScript(self):
|
| 133 |
+
deepdict = {'level1': {'level2': {'level3': {'level4': {}}}}}
|
| 134 |
+
script = completion.Script('deepdict', deepdict, shell='fish')
|
| 135 |
+
self.assertIn('level1', script)
|
| 136 |
+
self.assertIn('level2', script)
|
| 137 |
+
self.assertIn('level3', script)
|
| 138 |
+
self.assertNotIn('level4', script) # The default depth is 3.
|
| 139 |
+
|
| 140 |
+
def testFnFishScript(self):
|
| 141 |
+
script = completion.Script('identity', tc.identity, shell='fish')
|
| 142 |
+
self.assertIn('arg1', script)
|
| 143 |
+
self.assertIn('arg2', script)
|
| 144 |
+
self.assertIn('arg3', script)
|
| 145 |
+
self.assertIn('arg4', script)
|
| 146 |
+
|
| 147 |
+
def testClassFishScript(self):
|
| 148 |
+
script = completion.Script('', tc.MixedDefaults, shell='fish')
|
| 149 |
+
self.assertIn('ten', script)
|
| 150 |
+
self.assertIn('sum', script)
|
| 151 |
+
self.assertIn('identity', script)
|
| 152 |
+
self.assertIn('alpha', script)
|
| 153 |
+
self.assertIn('beta', script)
|
| 154 |
+
|
| 155 |
+
def testNonStringDictCompletions(self):
|
| 156 |
+
completions = completion.Completions({
|
| 157 |
+
10: 'green',
|
| 158 |
+
3.14: 'yellow',
|
| 159 |
+
('t1', 't2'): 'pink',
|
| 160 |
+
})
|
| 161 |
+
self.assertIn('10', completions)
|
| 162 |
+
self.assertIn('3.14', completions)
|
| 163 |
+
self.assertIn("('t1', 't2')", completions)
|
| 164 |
+
self.assertNotIn('green', completions)
|
| 165 |
+
self.assertNotIn('yellow', completions)
|
| 166 |
+
self.assertNotIn('pink', completions)
|
| 167 |
+
|
| 168 |
+
def testGeneratorCompletions(self):
|
| 169 |
+
def generator():
|
| 170 |
+
x = 0
|
| 171 |
+
while True:
|
| 172 |
+
yield x
|
| 173 |
+
x += 1
|
| 174 |
+
completions = completion.Completions(generator())
|
| 175 |
+
self.assertEqual(completions, [])
|
| 176 |
+
|
| 177 |
+
def testClassCompletions(self):
|
| 178 |
+
completions = completion.Completions(tc.NoDefaults)
|
| 179 |
+
self.assertEqual(completions, [])
|
| 180 |
+
|
| 181 |
+
def testObjectCompletions(self):
|
| 182 |
+
completions = completion.Completions(tc.NoDefaults())
|
| 183 |
+
self.assertIn('double', completions)
|
| 184 |
+
self.assertIn('triple', completions)
|
| 185 |
+
|
| 186 |
+
def testMethodCompletions(self):
|
| 187 |
+
completions = completion.Completions(tc.NoDefaults().double)
|
| 188 |
+
self.assertNotIn('--self', completions)
|
| 189 |
+
self.assertIn('--count', completions)
|
| 190 |
+
|
| 191 |
+
|
| 192 |
+
if __name__ == '__main__':
|
| 193 |
+
testutils.main()
|
parrot/lib/python3.10/site-packages/fire/interact.py
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (C) 2018 Google Inc.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
"""This module enables interactive mode in Python Fire.
|
| 16 |
+
|
| 17 |
+
It uses IPython as an optional dependency. When IPython is installed, the
|
| 18 |
+
interactive flag will use IPython's REPL. When IPython is not installed, the
|
| 19 |
+
interactive flag will start a Python REPL with the builtin `code` module's
|
| 20 |
+
InteractiveConsole class.
|
| 21 |
+
"""
|
| 22 |
+
|
| 23 |
+
from __future__ import absolute_import
|
| 24 |
+
from __future__ import division
|
| 25 |
+
from __future__ import print_function
|
| 26 |
+
|
| 27 |
+
import inspect
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
def Embed(variables, verbose=False):
|
| 31 |
+
"""Drops into a Python REPL with variables available as local variables.
|
| 32 |
+
|
| 33 |
+
Args:
|
| 34 |
+
variables: A dict of variables to make available. Keys are variable names.
|
| 35 |
+
Values are variable values.
|
| 36 |
+
verbose: Whether to include 'hidden' members, those keys starting with _.
|
| 37 |
+
"""
|
| 38 |
+
print(_AvailableString(variables, verbose))
|
| 39 |
+
|
| 40 |
+
try:
|
| 41 |
+
_EmbedIPython(variables)
|
| 42 |
+
except ImportError:
|
| 43 |
+
_EmbedCode(variables)
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
def _AvailableString(variables, verbose=False):
|
| 47 |
+
"""Returns a string describing what objects are available in the Python REPL.
|
| 48 |
+
|
| 49 |
+
Args:
|
| 50 |
+
variables: A dict of the object to be available in the REPL.
|
| 51 |
+
verbose: Whether to include 'hidden' members, those keys starting with _.
|
| 52 |
+
Returns:
|
| 53 |
+
A string fit for printing at the start of the REPL, indicating what objects
|
| 54 |
+
are available for the user to use.
|
| 55 |
+
"""
|
| 56 |
+
modules = []
|
| 57 |
+
other = []
|
| 58 |
+
for name, value in variables.items():
|
| 59 |
+
if not verbose and name.startswith('_'):
|
| 60 |
+
continue
|
| 61 |
+
if '-' in name or '/' in name:
|
| 62 |
+
continue
|
| 63 |
+
|
| 64 |
+
if inspect.ismodule(value):
|
| 65 |
+
modules.append(name)
|
| 66 |
+
else:
|
| 67 |
+
other.append(name)
|
| 68 |
+
|
| 69 |
+
lists = [
|
| 70 |
+
('Modules', modules),
|
| 71 |
+
('Objects', other)]
|
| 72 |
+
liststrs = []
|
| 73 |
+
for name, varlist in lists:
|
| 74 |
+
if varlist:
|
| 75 |
+
liststrs.append(
|
| 76 |
+
'{name}: {items}'.format(name=name, items=', '.join(sorted(varlist))))
|
| 77 |
+
|
| 78 |
+
return (
|
| 79 |
+
'Fire is starting a Python REPL with the following objects:\n'
|
| 80 |
+
'{liststrs}\n'
|
| 81 |
+
).format(liststrs='\n'.join(liststrs))
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
def _EmbedIPython(variables, argv=None):
|
| 85 |
+
"""Drops into an IPython REPL with variables available for use.
|
| 86 |
+
|
| 87 |
+
Args:
|
| 88 |
+
variables: A dict of variables to make available. Keys are variable names.
|
| 89 |
+
Values are variable values.
|
| 90 |
+
argv: The argv to use for starting ipython. Defaults to an empty list.
|
| 91 |
+
"""
|
| 92 |
+
import IPython # pylint: disable=import-outside-toplevel,g-import-not-at-top
|
| 93 |
+
argv = argv or []
|
| 94 |
+
IPython.start_ipython(argv=argv, user_ns=variables)
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
def _EmbedCode(variables):
|
| 98 |
+
import code # pylint: disable=import-outside-toplevel,g-import-not-at-top
|
| 99 |
+
code.InteractiveConsole(variables).interact()
|
parrot/lib/python3.10/site-packages/fire/testutils_test.py
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright (C) 2018 Google Inc.
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
"""Test the test utilities for Fire's tests."""
|
| 16 |
+
|
| 17 |
+
from __future__ import absolute_import
|
| 18 |
+
from __future__ import division
|
| 19 |
+
from __future__ import print_function
|
| 20 |
+
|
| 21 |
+
import sys
|
| 22 |
+
|
| 23 |
+
from fire import testutils
|
| 24 |
+
|
| 25 |
+
import six
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
class TestTestUtils(testutils.BaseTestCase):
|
| 29 |
+
"""Let's get meta."""
|
| 30 |
+
|
| 31 |
+
def testNoCheckOnException(self):
|
| 32 |
+
with self.assertRaises(ValueError):
|
| 33 |
+
with self.assertOutputMatches(stdout='blah'):
|
| 34 |
+
raise ValueError()
|
| 35 |
+
|
| 36 |
+
def testCheckStdoutOrStderrNone(self):
|
| 37 |
+
with six.assertRaisesRegex(self, AssertionError, 'stdout:'):
|
| 38 |
+
with self.assertOutputMatches(stdout=None):
|
| 39 |
+
print('blah')
|
| 40 |
+
|
| 41 |
+
with six.assertRaisesRegex(self, AssertionError, 'stderr:'):
|
| 42 |
+
with self.assertOutputMatches(stderr=None):
|
| 43 |
+
print('blah', file=sys.stderr)
|
| 44 |
+
|
| 45 |
+
with six.assertRaisesRegex(self, AssertionError, 'stderr:'):
|
| 46 |
+
with self.assertOutputMatches(stdout='apple', stderr=None):
|
| 47 |
+
print('apple')
|
| 48 |
+
print('blah', file=sys.stderr)
|
| 49 |
+
|
| 50 |
+
def testCorrectOrderingOfAssertRaises(self):
|
| 51 |
+
# Check to make sure FireExit tests are correct.
|
| 52 |
+
with self.assertOutputMatches(stdout='Yep.*first.*second'):
|
| 53 |
+
with self.assertRaises(ValueError):
|
| 54 |
+
print('Yep, this is the first line.\nThis is the second.')
|
| 55 |
+
raise ValueError()
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
if __name__ == '__main__':
|
| 59 |
+
testutils.main()
|
parrot/lib/python3.10/site-packages/mdurl-0.1.2.dist-info/METADATA
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.1
|
| 2 |
+
Name: mdurl
|
| 3 |
+
Version: 0.1.2
|
| 4 |
+
Summary: Markdown URL utilities
|
| 5 |
+
Keywords: markdown,commonmark
|
| 6 |
+
Author-email: Taneli Hukkinen <hukkin@users.noreply.github.com>
|
| 7 |
+
Requires-Python: >=3.7
|
| 8 |
+
Description-Content-Type: text/markdown
|
| 9 |
+
Classifier: License :: OSI Approved :: MIT License
|
| 10 |
+
Classifier: Operating System :: MacOS
|
| 11 |
+
Classifier: Operating System :: Microsoft :: Windows
|
| 12 |
+
Classifier: Operating System :: POSIX :: Linux
|
| 13 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
| 14 |
+
Classifier: Programming Language :: Python :: 3.7
|
| 15 |
+
Classifier: Programming Language :: Python :: 3.8
|
| 16 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 17 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 18 |
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
| 19 |
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
| 20 |
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
| 21 |
+
Classifier: Typing :: Typed
|
| 22 |
+
Project-URL: Homepage, https://github.com/executablebooks/mdurl
|
| 23 |
+
|
| 24 |
+
# mdurl
|
| 25 |
+
|
| 26 |
+
[](https://github.com/executablebooks/mdurl/actions?query=workflow%3ATests+branch%3Amaster+event%3Apush)
|
| 27 |
+
[](https://codecov.io/gh/executablebooks/mdurl)
|
| 28 |
+
[](https://pypi.org/project/mdurl)
|
| 29 |
+
|
| 30 |
+
This is a Python port of the JavaScript [mdurl](https://www.npmjs.com/package/mdurl) package.
|
| 31 |
+
See the [upstream README.md file](https://github.com/markdown-it/mdurl/blob/master/README.md) for API documentation.
|
| 32 |
+
|
parrot/lib/python3.10/site-packages/openai/types/audio/__init__.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from .translation import Translation as Translation
|
| 6 |
+
from .transcription import Transcription as Transcription
|
| 7 |
+
from .speech_create_params import SpeechCreateParams as SpeechCreateParams
|
| 8 |
+
from .translation_create_params import (
|
| 9 |
+
TranslationCreateParams as TranslationCreateParams,
|
| 10 |
+
)
|
| 11 |
+
from .transcription_create_params import (
|
| 12 |
+
TranscriptionCreateParams as TranscriptionCreateParams,
|
| 13 |
+
)
|
parrot/lib/python3.10/site-packages/openai/types/audio/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (532 Bytes). View file
|
|
|
parrot/lib/python3.10/site-packages/openai/types/audio/__pycache__/speech_create_params.cpython-310.pyc
ADDED
|
Binary file (867 Bytes). View file
|
|
|
parrot/lib/python3.10/site-packages/openai/types/audio/__pycache__/transcription.cpython-310.pyc
ADDED
|
Binary file (435 Bytes). View file
|
|
|
parrot/lib/python3.10/site-packages/openai/types/audio/__pycache__/transcription_create_params.cpython-310.pyc
ADDED
|
Binary file (903 Bytes). View file
|
|
|
parrot/lib/python3.10/site-packages/openai/types/audio/__pycache__/translation.cpython-310.pyc
ADDED
|
Binary file (431 Bytes). View file
|
|
|
parrot/lib/python3.10/site-packages/openai/types/audio/__pycache__/translation_create_params.cpython-310.pyc
ADDED
|
Binary file (820 Bytes). View file
|
|
|
parrot/lib/python3.10/site-packages/openai/types/audio/speech_create_params.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import Union
|
| 6 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 7 |
+
|
| 8 |
+
__all__ = ["SpeechCreateParams"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class SpeechCreateParams(TypedDict, total=False):
|
| 12 |
+
input: Required[str]
|
| 13 |
+
"""The text to generate audio for. The maximum length is 4096 characters."""
|
| 14 |
+
|
| 15 |
+
model: Required[Union[str, Literal["tts-1", "tts-1-hd"]]]
|
| 16 |
+
"""
|
| 17 |
+
One of the available [TTS models](https://platform.openai.com/docs/models/tts):
|
| 18 |
+
`tts-1` or `tts-1-hd`
|
| 19 |
+
"""
|
| 20 |
+
|
| 21 |
+
voice: Required[Literal["alloy", "echo", "fable", "onyx", "nova", "shimmer"]]
|
| 22 |
+
"""The voice to use when generating the audio.
|
| 23 |
+
|
| 24 |
+
Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`.
|
| 25 |
+
"""
|
| 26 |
+
|
| 27 |
+
response_format: Literal["mp3", "opus", "aac", "flac"]
|
| 28 |
+
"""The format to audio in. Supported formats are `mp3`, `opus`, `aac`, and `flac`."""
|
| 29 |
+
|
| 30 |
+
speed: float
|
| 31 |
+
"""The speed of the generated audio.
|
| 32 |
+
|
| 33 |
+
Select a value from `0.25` to `4.0`. `1.0` is the default.
|
| 34 |
+
"""
|
parrot/lib/python3.10/site-packages/openai/types/audio/transcription.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless.
|
| 2 |
+
|
| 3 |
+
from ..._models import BaseModel
|
| 4 |
+
|
| 5 |
+
__all__ = ["Transcription"]
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
class Transcription(BaseModel):
|
| 9 |
+
text: str
|
parrot/lib/python3.10/site-packages/openai/types/audio/transcription_create_params.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import Union
|
| 6 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 7 |
+
|
| 8 |
+
from ..._types import FileTypes
|
| 9 |
+
|
| 10 |
+
__all__ = ["TranscriptionCreateParams"]
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
class TranscriptionCreateParams(TypedDict, total=False):
|
| 14 |
+
file: Required[FileTypes]
|
| 15 |
+
"""
|
| 16 |
+
The audio file object (not file name) to transcribe, in one of these formats:
|
| 17 |
+
flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
|
| 18 |
+
"""
|
| 19 |
+
|
| 20 |
+
model: Required[Union[str, Literal["whisper-1"]]]
|
| 21 |
+
"""ID of the model to use. Only `whisper-1` is currently available."""
|
| 22 |
+
|
| 23 |
+
language: str
|
| 24 |
+
"""The language of the input audio.
|
| 25 |
+
|
| 26 |
+
Supplying the input language in
|
| 27 |
+
[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will
|
| 28 |
+
improve accuracy and latency.
|
| 29 |
+
"""
|
| 30 |
+
|
| 31 |
+
prompt: str
|
| 32 |
+
"""An optional text to guide the model's style or continue a previous audio
|
| 33 |
+
segment.
|
| 34 |
+
|
| 35 |
+
The [prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting)
|
| 36 |
+
should match the audio language.
|
| 37 |
+
"""
|
| 38 |
+
|
| 39 |
+
response_format: Literal["json", "text", "srt", "verbose_json", "vtt"]
|
| 40 |
+
"""
|
| 41 |
+
The format of the transcript output, in one of these options: `json`, `text`,
|
| 42 |
+
`srt`, `verbose_json`, or `vtt`.
|
| 43 |
+
"""
|
| 44 |
+
|
| 45 |
+
temperature: float
|
| 46 |
+
"""The sampling temperature, between 0 and 1.
|
| 47 |
+
|
| 48 |
+
Higher values like 0.8 will make the output more random, while lower values like
|
| 49 |
+
0.2 will make it more focused and deterministic. If set to 0, the model will use
|
| 50 |
+
[log probability](https://en.wikipedia.org/wiki/Log_probability) to
|
| 51 |
+
automatically increase the temperature until certain thresholds are hit.
|
| 52 |
+
"""
|
parrot/lib/python3.10/site-packages/openai/types/audio/translation.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless.
|
| 2 |
+
|
| 3 |
+
from ..._models import BaseModel
|
| 4 |
+
|
| 5 |
+
__all__ = ["Translation"]
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
class Translation(BaseModel):
|
| 9 |
+
text: str
|
parrot/lib/python3.10/site-packages/openai/types/audio/translation_create_params.py
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import Union
|
| 6 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 7 |
+
|
| 8 |
+
from ..._types import FileTypes
|
| 9 |
+
|
| 10 |
+
__all__ = ["TranslationCreateParams"]
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
class TranslationCreateParams(TypedDict, total=False):
|
| 14 |
+
file: Required[FileTypes]
|
| 15 |
+
"""
|
| 16 |
+
The audio file object (not file name) translate, in one of these formats: flac,
|
| 17 |
+
mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
|
| 18 |
+
"""
|
| 19 |
+
|
| 20 |
+
model: Required[Union[str, Literal["whisper-1"]]]
|
| 21 |
+
"""ID of the model to use. Only `whisper-1` is currently available."""
|
| 22 |
+
|
| 23 |
+
prompt: str
|
| 24 |
+
"""An optional text to guide the model's style or continue a previous audio
|
| 25 |
+
segment.
|
| 26 |
+
|
| 27 |
+
The [prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting)
|
| 28 |
+
should be in English.
|
| 29 |
+
"""
|
| 30 |
+
|
| 31 |
+
response_format: str
|
| 32 |
+
"""
|
| 33 |
+
The format of the transcript output, in one of these options: `json`, `text`,
|
| 34 |
+
`srt`, `verbose_json`, or `vtt`.
|
| 35 |
+
"""
|
| 36 |
+
|
| 37 |
+
temperature: float
|
| 38 |
+
"""The sampling temperature, between 0 and 1.
|
| 39 |
+
|
| 40 |
+
Higher values like 0.8 will make the output more random, while lower values like
|
| 41 |
+
0.2 will make it more focused and deterministic. If set to 0, the model will use
|
| 42 |
+
[log probability](https://en.wikipedia.org/wiki/Log_probability) to
|
| 43 |
+
automatically increase the temperature until certain thresholds are hit.
|
| 44 |
+
"""
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/__init__.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from .run import Run as Run
|
| 6 |
+
from .thread_message import ThreadMessage as ThreadMessage
|
| 7 |
+
from .run_list_params import RunListParams as RunListParams
|
| 8 |
+
from .run_create_params import RunCreateParams as RunCreateParams
|
| 9 |
+
from .run_update_params import RunUpdateParams as RunUpdateParams
|
| 10 |
+
from .message_list_params import MessageListParams as MessageListParams
|
| 11 |
+
from .message_content_text import MessageContentText as MessageContentText
|
| 12 |
+
from .message_create_params import MessageCreateParams as MessageCreateParams
|
| 13 |
+
from .message_update_params import MessageUpdateParams as MessageUpdateParams
|
| 14 |
+
from .message_content_image_file import (
|
| 15 |
+
MessageContentImageFile as MessageContentImageFile,
|
| 16 |
+
)
|
| 17 |
+
from .run_submit_tool_outputs_params import (
|
| 18 |
+
RunSubmitToolOutputsParams as RunSubmitToolOutputsParams,
|
| 19 |
+
)
|
| 20 |
+
from .required_action_function_tool_call import (
|
| 21 |
+
RequiredActionFunctionToolCall as RequiredActionFunctionToolCall,
|
| 22 |
+
)
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (976 Bytes). View file
|
|
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/__pycache__/message_content_image_file.cpython-310.pyc
ADDED
|
Binary file (724 Bytes). View file
|
|
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/__pycache__/message_content_text.cpython-310.pyc
ADDED
|
Binary file (1.72 kB). View file
|
|
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/__pycache__/message_create_params.cpython-310.pyc
ADDED
|
Binary file (756 Bytes). View file
|
|
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/__pycache__/message_list_params.cpython-310.pyc
ADDED
|
Binary file (636 Bytes). View file
|
|
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/__pycache__/run_create_params.cpython-310.pyc
ADDED
|
Binary file (1.52 kB). View file
|
|
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/__pycache__/run_submit_tool_outputs_params.cpython-310.pyc
ADDED
|
Binary file (852 Bytes). View file
|
|
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/__pycache__/run_update_params.cpython-310.pyc
ADDED
|
Binary file (631 Bytes). View file
|
|
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/__pycache__/thread_message.cpython-310.pyc
ADDED
|
Binary file (1.07 kB). View file
|
|
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/message_content_image_file.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless.
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal
|
| 4 |
+
|
| 5 |
+
from ...._models import BaseModel
|
| 6 |
+
|
| 7 |
+
__all__ = ["MessageContentImageFile", "ImageFile"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class ImageFile(BaseModel):
|
| 11 |
+
file_id: str
|
| 12 |
+
"""
|
| 13 |
+
The [File](https://platform.openai.com/docs/api-reference/files) ID of the image
|
| 14 |
+
in the message content.
|
| 15 |
+
"""
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
class MessageContentImageFile(BaseModel):
|
| 19 |
+
image_file: ImageFile
|
| 20 |
+
|
| 21 |
+
type: Literal["image_file"]
|
| 22 |
+
"""Always `image_file`."""
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/message_list_params.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing_extensions import Literal, TypedDict
|
| 6 |
+
|
| 7 |
+
__all__ = ["MessageListParams"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class MessageListParams(TypedDict, total=False):
|
| 11 |
+
after: str
|
| 12 |
+
"""A cursor for use in pagination.
|
| 13 |
+
|
| 14 |
+
`after` is an object ID that defines your place in the list. For instance, if
|
| 15 |
+
you make a list request and receive 100 objects, ending with obj_foo, your
|
| 16 |
+
subsequent call can include after=obj_foo in order to fetch the next page of the
|
| 17 |
+
list.
|
| 18 |
+
"""
|
| 19 |
+
|
| 20 |
+
before: str
|
| 21 |
+
"""A cursor for use in pagination.
|
| 22 |
+
|
| 23 |
+
`before` is an object ID that defines your place in the list. For instance, if
|
| 24 |
+
you make a list request and receive 100 objects, ending with obj_foo, your
|
| 25 |
+
subsequent call can include before=obj_foo in order to fetch the previous page
|
| 26 |
+
of the list.
|
| 27 |
+
"""
|
| 28 |
+
|
| 29 |
+
limit: int
|
| 30 |
+
"""A limit on the number of objects to be returned.
|
| 31 |
+
|
| 32 |
+
Limit can range between 1 and 100, and the default is 20.
|
| 33 |
+
"""
|
| 34 |
+
|
| 35 |
+
order: Literal["asc", "desc"]
|
| 36 |
+
"""Sort order by the `created_at` timestamp of the objects.
|
| 37 |
+
|
| 38 |
+
`asc` for ascending order and `desc` for descending order.
|
| 39 |
+
"""
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/message_update_params.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import Optional
|
| 6 |
+
from typing_extensions import Required, TypedDict
|
| 7 |
+
|
| 8 |
+
__all__ = ["MessageUpdateParams"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class MessageUpdateParams(TypedDict, total=False):
|
| 12 |
+
thread_id: Required[str]
|
| 13 |
+
|
| 14 |
+
metadata: Optional[object]
|
| 15 |
+
"""Set of 16 key-value pairs that can be attached to an object.
|
| 16 |
+
|
| 17 |
+
This can be useful for storing additional information about the object in a
|
| 18 |
+
structured format. Keys can be a maximum of 64 characters long and values can be
|
| 19 |
+
a maxium of 512 characters long.
|
| 20 |
+
"""
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/messages/__init__.py
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from .message_file import MessageFile as MessageFile
|
| 6 |
+
from .file_list_params import FileListParams as FileListParams
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/messages/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (340 Bytes). View file
|
|
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/messages/__pycache__/file_list_params.cpython-310.pyc
ADDED
|
Binary file (694 Bytes). View file
|
|
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/messages/__pycache__/message_file.cpython-310.pyc
ADDED
|
Binary file (611 Bytes). View file
|
|
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/messages/file_list_params.py
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 6 |
+
|
| 7 |
+
__all__ = ["FileListParams"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class FileListParams(TypedDict, total=False):
|
| 11 |
+
thread_id: Required[str]
|
| 12 |
+
|
| 13 |
+
after: str
|
| 14 |
+
"""A cursor for use in pagination.
|
| 15 |
+
|
| 16 |
+
`after` is an object ID that defines your place in the list. For instance, if
|
| 17 |
+
you make a list request and receive 100 objects, ending with obj_foo, your
|
| 18 |
+
subsequent call can include after=obj_foo in order to fetch the next page of the
|
| 19 |
+
list.
|
| 20 |
+
"""
|
| 21 |
+
|
| 22 |
+
before: str
|
| 23 |
+
"""A cursor for use in pagination.
|
| 24 |
+
|
| 25 |
+
`before` is an object ID that defines your place in the list. For instance, if
|
| 26 |
+
you make a list request and receive 100 objects, ending with obj_foo, your
|
| 27 |
+
subsequent call can include before=obj_foo in order to fetch the previous page
|
| 28 |
+
of the list.
|
| 29 |
+
"""
|
| 30 |
+
|
| 31 |
+
limit: int
|
| 32 |
+
"""A limit on the number of objects to be returned.
|
| 33 |
+
|
| 34 |
+
Limit can range between 1 and 100, and the default is 20.
|
| 35 |
+
"""
|
| 36 |
+
|
| 37 |
+
order: Literal["asc", "desc"]
|
| 38 |
+
"""Sort order by the `created_at` timestamp of the objects.
|
| 39 |
+
|
| 40 |
+
`asc` for ascending order and `desc` for descending order.
|
| 41 |
+
"""
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/messages/message_file.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless.
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal
|
| 4 |
+
|
| 5 |
+
from ....._models import BaseModel
|
| 6 |
+
|
| 7 |
+
__all__ = ["MessageFile"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class MessageFile(BaseModel):
|
| 11 |
+
id: str
|
| 12 |
+
"""The identifier, which can be referenced in API endpoints."""
|
| 13 |
+
|
| 14 |
+
created_at: int
|
| 15 |
+
"""The Unix timestamp (in seconds) for when the message file was created."""
|
| 16 |
+
|
| 17 |
+
message_id: str
|
| 18 |
+
"""
|
| 19 |
+
The ID of the [message](https://platform.openai.com/docs/api-reference/messages)
|
| 20 |
+
that the [File](https://platform.openai.com/docs/api-reference/files) is
|
| 21 |
+
attached to.
|
| 22 |
+
"""
|
| 23 |
+
|
| 24 |
+
object: Literal["thread.message.file"]
|
| 25 |
+
"""The object type, which is always `thread.message.file`."""
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/required_action_function_tool_call.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless.
|
| 2 |
+
|
| 3 |
+
from typing_extensions import Literal
|
| 4 |
+
|
| 5 |
+
from ...._models import BaseModel
|
| 6 |
+
|
| 7 |
+
__all__ = ["RequiredActionFunctionToolCall", "Function"]
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class Function(BaseModel):
|
| 11 |
+
arguments: str
|
| 12 |
+
"""The arguments that the model expects you to pass to the function."""
|
| 13 |
+
|
| 14 |
+
name: str
|
| 15 |
+
"""The name of the function."""
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
class RequiredActionFunctionToolCall(BaseModel):
|
| 19 |
+
id: str
|
| 20 |
+
"""The ID of the tool call.
|
| 21 |
+
|
| 22 |
+
This ID must be referenced when you submit the tool outputs in using the
|
| 23 |
+
[Submit tool outputs to run](https://platform.openai.com/docs/api-reference/runs/submitToolOutputs)
|
| 24 |
+
endpoint.
|
| 25 |
+
"""
|
| 26 |
+
|
| 27 |
+
function: Function
|
| 28 |
+
"""The function definition."""
|
| 29 |
+
|
| 30 |
+
type: Literal["function"]
|
| 31 |
+
"""The type of tool call the output is required for.
|
| 32 |
+
|
| 33 |
+
For now, this is always `function`.
|
| 34 |
+
"""
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/run_create_params.py
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import List, Union, Optional
|
| 6 |
+
from typing_extensions import Literal, Required, TypedDict
|
| 7 |
+
|
| 8 |
+
from ....types import shared_params
|
| 9 |
+
|
| 10 |
+
__all__ = [
|
| 11 |
+
"RunCreateParams",
|
| 12 |
+
"Tool",
|
| 13 |
+
"ToolAssistantToolsCode",
|
| 14 |
+
"ToolAssistantToolsRetrieval",
|
| 15 |
+
"ToolAssistantToolsFunction",
|
| 16 |
+
]
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
class RunCreateParams(TypedDict, total=False):
|
| 20 |
+
assistant_id: Required[str]
|
| 21 |
+
"""
|
| 22 |
+
The ID of the
|
| 23 |
+
[assistant](https://platform.openai.com/docs/api-reference/assistants) to use to
|
| 24 |
+
execute this run.
|
| 25 |
+
"""
|
| 26 |
+
|
| 27 |
+
instructions: Optional[str]
|
| 28 |
+
"""Override the default system message of the assistant.
|
| 29 |
+
|
| 30 |
+
This is useful for modifying the behavior on a per-run basis.
|
| 31 |
+
"""
|
| 32 |
+
|
| 33 |
+
metadata: Optional[object]
|
| 34 |
+
"""Set of 16 key-value pairs that can be attached to an object.
|
| 35 |
+
|
| 36 |
+
This can be useful for storing additional information about the object in a
|
| 37 |
+
structured format. Keys can be a maximum of 64 characters long and values can be
|
| 38 |
+
a maxium of 512 characters long.
|
| 39 |
+
"""
|
| 40 |
+
|
| 41 |
+
model: Optional[str]
|
| 42 |
+
"""
|
| 43 |
+
The ID of the [Model](https://platform.openai.com/docs/api-reference/models) to
|
| 44 |
+
be used to execute this run. If a value is provided here, it will override the
|
| 45 |
+
model associated with the assistant. If not, the model associated with the
|
| 46 |
+
assistant will be used.
|
| 47 |
+
"""
|
| 48 |
+
|
| 49 |
+
tools: Optional[List[Tool]]
|
| 50 |
+
"""Override the tools the assistant can use for this run.
|
| 51 |
+
|
| 52 |
+
This is useful for modifying the behavior on a per-run basis.
|
| 53 |
+
"""
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
class ToolAssistantToolsCode(TypedDict, total=False):
|
| 57 |
+
type: Required[Literal["code_interpreter"]]
|
| 58 |
+
"""The type of tool being defined: `code_interpreter`"""
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
class ToolAssistantToolsRetrieval(TypedDict, total=False):
|
| 62 |
+
type: Required[Literal["retrieval"]]
|
| 63 |
+
"""The type of tool being defined: `retrieval`"""
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
class ToolAssistantToolsFunction(TypedDict, total=False):
|
| 67 |
+
function: Required[shared_params.FunctionDefinition]
|
| 68 |
+
|
| 69 |
+
type: Required[Literal["function"]]
|
| 70 |
+
"""The type of tool being defined: `function`"""
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
Tool = Union[ToolAssistantToolsCode, ToolAssistantToolsRetrieval, ToolAssistantToolsFunction]
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/run_submit_tool_outputs_params.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import List
|
| 6 |
+
from typing_extensions import Required, TypedDict
|
| 7 |
+
|
| 8 |
+
__all__ = ["RunSubmitToolOutputsParams", "ToolOutput"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class RunSubmitToolOutputsParams(TypedDict, total=False):
|
| 12 |
+
thread_id: Required[str]
|
| 13 |
+
|
| 14 |
+
tool_outputs: Required[List[ToolOutput]]
|
| 15 |
+
"""A list of tools for which the outputs are being submitted."""
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
class ToolOutput(TypedDict, total=False):
|
| 19 |
+
output: str
|
| 20 |
+
"""The output of the tool call to be submitted to continue the run."""
|
| 21 |
+
|
| 22 |
+
tool_call_id: str
|
| 23 |
+
"""
|
| 24 |
+
The ID of the tool call in the `required_action` object within the run object
|
| 25 |
+
the output is being submitted for.
|
| 26 |
+
"""
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/run_update_params.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless.
|
| 2 |
+
|
| 3 |
+
from __future__ import annotations
|
| 4 |
+
|
| 5 |
+
from typing import Optional
|
| 6 |
+
from typing_extensions import Required, TypedDict
|
| 7 |
+
|
| 8 |
+
__all__ = ["RunUpdateParams"]
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class RunUpdateParams(TypedDict, total=False):
|
| 12 |
+
thread_id: Required[str]
|
| 13 |
+
|
| 14 |
+
metadata: Optional[object]
|
| 15 |
+
"""Set of 16 key-value pairs that can be attached to an object.
|
| 16 |
+
|
| 17 |
+
This can be useful for storing additional information about the object in a
|
| 18 |
+
structured format. Keys can be a maximum of 64 characters long and values can be
|
| 19 |
+
a maxium of 512 characters long.
|
| 20 |
+
"""
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/runs/tool_calls_step_details.py
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless.
|
| 2 |
+
|
| 3 |
+
from typing import List, Union
|
| 4 |
+
from typing_extensions import Literal
|
| 5 |
+
|
| 6 |
+
from ....._models import BaseModel
|
| 7 |
+
from .code_tool_call import CodeToolCall
|
| 8 |
+
from .function_tool_call import FunctionToolCall
|
| 9 |
+
from .retrieval_tool_call import RetrievalToolCall
|
| 10 |
+
|
| 11 |
+
__all__ = ["ToolCallsStepDetails", "ToolCall"]
|
| 12 |
+
|
| 13 |
+
ToolCall = Union[CodeToolCall, RetrievalToolCall, FunctionToolCall]
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
class ToolCallsStepDetails(BaseModel):
|
| 17 |
+
tool_calls: List[ToolCall]
|
| 18 |
+
"""An array of tool calls the run step was involved in.
|
| 19 |
+
|
| 20 |
+
These can be associated with one of three types of tools: `code_interpreter`,
|
| 21 |
+
`retrieval`, or `function`.
|
| 22 |
+
"""
|
| 23 |
+
|
| 24 |
+
type: Literal["tool_calls"]
|
| 25 |
+
"""Always `tool_calls`."""
|
parrot/lib/python3.10/site-packages/openai/types/beta/threads/thread_message.py
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# File generated from our OpenAPI spec by Stainless.
|
| 2 |
+
|
| 3 |
+
import builtins
|
| 4 |
+
from typing import List, Union, Optional
|
| 5 |
+
from typing_extensions import Literal
|
| 6 |
+
|
| 7 |
+
from ...._models import BaseModel
|
| 8 |
+
from .message_content_text import MessageContentText
|
| 9 |
+
from .message_content_image_file import MessageContentImageFile
|
| 10 |
+
|
| 11 |
+
__all__ = ["ThreadMessage", "Content"]
|
| 12 |
+
|
| 13 |
+
Content = Union[MessageContentImageFile, MessageContentText]
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
class ThreadMessage(BaseModel):
|
| 17 |
+
id: str
|
| 18 |
+
"""The identifier, which can be referenced in API endpoints."""
|
| 19 |
+
|
| 20 |
+
assistant_id: Optional[str]
|
| 21 |
+
"""
|
| 22 |
+
If applicable, the ID of the
|
| 23 |
+
[assistant](https://platform.openai.com/docs/api-reference/assistants) that
|
| 24 |
+
authored this message.
|
| 25 |
+
"""
|
| 26 |
+
|
| 27 |
+
content: List[Content]
|
| 28 |
+
"""The content of the message in array of text and/or images."""
|
| 29 |
+
|
| 30 |
+
created_at: int
|
| 31 |
+
"""The Unix timestamp (in seconds) for when the message was created."""
|
| 32 |
+
|
| 33 |
+
file_ids: List[str]
|
| 34 |
+
"""
|
| 35 |
+
A list of [file](https://platform.openai.com/docs/api-reference/files) IDs that
|
| 36 |
+
the assistant should use. Useful for tools like retrieval and code_interpreter
|
| 37 |
+
that can access files. A maximum of 10 files can be attached to a message.
|
| 38 |
+
"""
|
| 39 |
+
|
| 40 |
+
metadata: Optional[builtins.object]
|
| 41 |
+
"""Set of 16 key-value pairs that can be attached to an object.
|
| 42 |
+
|
| 43 |
+
This can be useful for storing additional information about the object in a
|
| 44 |
+
structured format. Keys can be a maximum of 64 characters long and values can be
|
| 45 |
+
a maxium of 512 characters long.
|
| 46 |
+
"""
|
| 47 |
+
|
| 48 |
+
object: Literal["thread.message"]
|
| 49 |
+
"""The object type, which is always `thread.message`."""
|
| 50 |
+
|
| 51 |
+
role: Literal["user", "assistant"]
|
| 52 |
+
"""The entity that produced the message. One of `user` or `assistant`."""
|
| 53 |
+
|
| 54 |
+
run_id: Optional[str]
|
| 55 |
+
"""
|
| 56 |
+
If applicable, the ID of the
|
| 57 |
+
[run](https://platform.openai.com/docs/api-reference/runs) associated with the
|
| 58 |
+
authoring of this message.
|
| 59 |
+
"""
|
| 60 |
+
|
| 61 |
+
thread_id: str
|
| 62 |
+
"""
|
| 63 |
+
The [thread](https://platform.openai.com/docs/api-reference/threads) ID that
|
| 64 |
+
this message belongs to.
|
| 65 |
+
"""
|