Skip to content

Conversation

@alecsolder
Copy link
Contributor

@alecsolder alecsolder commented Feb 12, 2025

This PR is NOT ready for review yet!

Why are these changes needed?

Related issue number

Checks

if logging_enabled():
log_function_use(self, func, kwargs, retval)
return serialize_to_str(retval)
return retval
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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"]
Copy link
Contributor

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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**kwargs,
**kwargs: Any,

@alecsolder alecsolder closed this May 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants