griptape icon indicating copy to clipboard operation
griptape copied to clipboard

Update StructureVisualizer to be able to identify what model/prompt_driver is being used

Open shhlife opened this issue 1 year ago • 1 comments

It would be incredibly useful to be able to visualize where your data is going - for example, what data is going to go to gpt-4o vs llama3.1.

Perhaps we could add the ability for StructureVisualizer to do this for Agents as well?

for example, for this code:

agent = Agent(
    stream=True,
    prompt_driver=OpenAiChatPromptDriver(model="gpt-4o"),
    tools=[
        WebScraperTool(off_prompt=True),
        QueryTool(prompt_driver=OllamaPromptDriver(model="llama3.1")),
    ],
)

we could display something like:

image

This should also work for Workflows & Pipelines so you know what drivers various tasks are using.

shhlife avatar Aug 27 '24 20:08 shhlife

For anyone interested: the easiest way to implement this would likely be to convert the Structure to a dictionary, and then build a graph from the dictionary fields.

collindutter avatar Aug 27 '24 20:08 collindutter