Open
Description
To organize better the code, I created an Agent class where I can run a simple step or run an infinite loop to talk with it, as well as get important information in between.
However, it seems that it won't version the prompt anymore. When looking in Studio, I only get a <BmV>
tag with self = <Agent object>
. It seems only the tools are versioned now. The code below is what I get when I look there.
from types import GenericAlias
from typing import _GenericAlias
import ell
# <BmV>
self = <Agent object>
# </BmV>
# <BV>
DEBUG = True
# </BV>
def mock_generate_qr_code(amount: int = None) -> Dict[str, Union[int, str]]:
"""Generate a QR code"""
if amount <= 0 or amount is None:
return {
"status": 200,
"message": "qr code generated",
"tool": "generate_qr_code",
}
else:
print(f"Mock generating qr code with {amount}")
return {
"status": 200,
"message": f"qr code generated successfully with {amount}",
"tool": "generate_qr_code",
}
@ell.tool()
def generate_qr_code(amount: int = None):
"""Generate a QR code"""
if DEBUG:
return mock_generate_qr_code(amount=amount)
else:
# Real API call here
raise NotImplementedError("Real API call not implemented")
Metadata
Metadata
Assignees
Labels
No labels