mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-29 03:14:19 +00:00
API spec update, client demo with Stainless SDK (#58)
* [wip] client w/ stainless sdk * update generator & yaml spec * update wrapper request * update script * agentic system client sdk * add comment todos * remove client sdk examples
This commit is contained in:
parent
741310f78e
commit
4f021de10f
3 changed files with 678 additions and 67 deletions
|
@ -468,12 +468,14 @@ class Generator:
|
|||
builder = ContentBuilder(self.schema_builder)
|
||||
first = next(iter(op.request_params))
|
||||
request_name, request_type = first
|
||||
|
||||
from dataclasses import make_dataclass
|
||||
|
||||
if len(op.request_params) == 1 and "Request" in first[1].__name__:
|
||||
# TODO(ashwin): Undo the "Request" hack and this entire block eventually
|
||||
request_name, request_type = first
|
||||
request_name = first[1].__name__ + "Wrapper"
|
||||
request_type = make_dataclass(request_name, op.request_params)
|
||||
else:
|
||||
from dataclasses import make_dataclass
|
||||
|
||||
op_name = "".join(word.capitalize() for word in op.name.split("_"))
|
||||
request_name = f"{op_name}Request"
|
||||
request_type = make_dataclass(request_name, op.request_params)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue