toolslm 0.3.19__tar.gz → 0.3.20__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: toolslm
3
- Version: 0.3.19
3
+ Version: 0.3.20
4
4
  Summary: Tools to make language models a bit easier to use
5
5
  Home-page: https://github.com/AnswerDotAI/toolslm
6
6
  Author: Jeremy Howard
@@ -1,7 +1,7 @@
1
1
  [DEFAULT]
2
2
  repo = toolslm
3
3
  lib_name = toolslm
4
- version = 0.3.19
4
+ version = 0.3.20
5
5
  min_python = 3.9
6
6
  license = apache2
7
7
  black_formatting = False
@@ -0,0 +1 @@
1
+ __version__ = "0.3.20"
@@ -141,7 +141,12 @@ def get_schema(
141
141
  assert desc, "Docstring missing!"
142
142
  d = docments(f, full=True)
143
143
  ret = d.pop('return')
144
- if (ret.anno is not empty) and (ret.anno is not None): desc += f'\n\nReturns:\n- type: {_types(ret.anno)[0]}'
144
+ has_type = (ret.anno is not empty) and (ret.anno is not None)
145
+ has_doc = ret.docment
146
+ if has_type or has_doc:
147
+ type_str = f'type: {_types(ret.anno)[0]}'
148
+ ret_str = f'{ret.docment} ({type_str})' if has_type and has_doc else (type_str if has_type else ret.docment)
149
+ desc += f'\n\nReturns:\n- {ret_str}'
145
150
  return {"name": f.__name__, "description": desc, pname: schema}
146
151
 
147
152
  # %% ../01_funccall.ipynb
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: toolslm
3
- Version: 0.3.19
3
+ Version: 0.3.20
4
4
  Summary: Tools to make language models a bit easier to use
5
5
  Home-page: https://github.com/AnswerDotAI/toolslm
6
6
  Author: Jeremy Howard
@@ -1 +0,0 @@
1
- __version__ = "0.3.19"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes