-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reliable Function Agent #927
base: main
Are you sure you want to change the base?
Conversation
@@ -3003,7 +3005,7 @@ async def _a_wrapped_func(*args, **kwargs): | |||
retval = await func(*args, **kwargs, **inject_params) | |||
if logging_enabled(): | |||
log_function_use(self, func, kwargs, retval) | |||
return serialize_to_str(retval) | |||
return retval |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should revert this and find a way to serialise Swarm result when needed.
from inspect import Parameter, Signature, markcoroutinefunction, signature | ||
from typing import Annotated, Any, Callable, Dict, List, Optional, Tuple, Union | ||
|
||
from openai import BaseModel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from openai import BaseModel | |
from pydantic import BaseModel |
|
||
# This class relies heavily on using context_variables to store state as it is working. | ||
# It uses the key {name}-ReliableFunctionContext as the location it writes to | ||
__all__ = ["ReliableFunctionAgent"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move up, just below the imports
def __init__( | ||
self, | ||
name: str, | ||
runner_llm_config: dict, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
runner_llm_config: dict, | |
runner_llm_config: dict[str, Any], |
validator_llm_config: dict, | ||
agent_system_message: str, | ||
validator_system_message: str, | ||
func_or_tool: Union[Callable, Tool], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func_or_tool: Union[Callable, Tool], | |
func_or_tool: Union[Callable[..., Any], Tool], |
validator_system_message: str, | ||
func_or_tool: Union[Callable, Tool], | ||
max_rounds: int = 10, | ||
**kwargs, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**kwargs, | |
**kwargs: Any, |
This PR is NOT ready for review yet!
Why are these changes needed?
Related issue number
Checks