Skip to content

team_designer.py in scripts#17

Open
gkreder wants to merge 11 commits into
mainfrom
team_designer
Open

team_designer.py in scripts#17
gkreder wants to merge 11 commits into
mainfrom
team_designer

Conversation

@gkreder

@gkreder gkreder commented Nov 24, 2023

Copy link
Copy Markdown
Collaborator

A team to design teams for a given purpose

@jmetz

jmetz commented Nov 24, 2023

Copy link
Copy Markdown
Contributor

This is really cool 🙌🎉 nice work @gkreder - will try it out on some other domains

@oeway

oeway commented Nov 24, 2023

Copy link
Copy Markdown
Collaborator

Awesome! Thank you both @jmetz and @gkreder !

Now I see you actually provide a code generation template code for the agent to create agent files! Which should already working right? The only downside of this is that we will need to "trust" the code generated and call eval or execute somewhere to be able to kick start the team generated by the agent.

I am thinking that maybe we can refine the part about the final implementation, instead of let it do full code generation, we only ask it to create name, profile, etc. plus their input/output in json schema, then we can store in a json file, as the team. Then we can load it back, dynamically create the team which can run. To implement this, you would need to implement dynamic pydantic model creation code, maybe take something like this: pydantic/pydantic#1638 (comment)

What do you think?

@jmetz

jmetz commented Nov 24, 2023

Copy link
Copy Markdown
Contributor

Dynamic pydantic model creation should be no different than standard dynamic class creation (eg using type), right?

@jmetz

jmetz commented Nov 24, 2023

Copy link
Copy Markdown
Contributor

But yeah I was watching @gkreder's massively improved version of what I was messing about with yesterday, and this code templating helps massively.

Did you figure out a way of getting the input -output matching working @gkreder ? If not will try and come up with some ideas for that over the next few days.

@oeway

oeway commented Nov 24, 2023

Copy link
Copy Markdown
Collaborator

Dynamic pydatic model creation should be no different than standard dynamic class creation (eg using type), right?

Good question, maybe that's similar! The key idea is that to let LLM to generate json schema, then create the pydantic class, either via create_model or type. Without thinking too much, create_model should be easier to use than type. And there is a reference code there exists. Make sense?

@oeway

oeway commented Nov 24, 2023

Copy link
Copy Markdown
Collaborator

Did you figure out a way of getting the input -output matching working @gkreder ? If not will try and come up with some ideas for that over the next few days.

Did you figure out a way of getting the input -output matching working @gkreder ? If not will try and come up with some ideas for that over the next few days.

You shouldn't have any matching issue if you design the "HR" agent schema in a way that all the schemas are generated in a pool (i.e. a list of json schemas), then produce the agent profile, plus action which will associated with the schema in the schema pool.

BTW, to create the mermaid image automatically, refer to this function.

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.

3 participants