gptscript-ai / desktop

MIT License
19 stars 13 forks source link

GitLab top level tool cannot be an assistant #215

Closed cjellick closed 2 weeks ago

cjellick commented 3 weeks ago

The top level gitlab tool at https://github.com/gptscript-ai/tools/blob/main/apis/gitlab/tool.gpt is written as an assistant. Tools in this repo cannot be written that way because it changes the personailty/context of the assistant that is imports them as a tool.

Take a look at this screen shot

Image

You can see that the messages coming back to not match how ive described the assistant.

cjellick commented 3 weeks ago

Getting past that, this tool doesnt really seem to work at all right now. It seems like only the very first subtool is getting picked up. So, if i ask to list repos, it goes sideways

Here's the question and response: Screenshot 2024-08-21 at 9 36 56 AM

And heres the relevant bit of output from the "stack trace". You can see that only a single operation is listed. There should be many. I am guessing this has something to do with the comlpex nested structure of this agent Screenshot 2024-08-21 at 9 38 21 AM

cjellick commented 2 weeks ago

Bill revamped the gitlab tool

sangee2004 commented 2 weeks ago

I am able to work with a gitlab tool.

Created an assistant and added gitlab tool using "Add by URL".

Able to chat with this assistant and see the assistant name given in the instruction of the assistant being used.

Image

I was able to list projects and then do some queries relating to latest commits , creating/commenting/closing issues in this project.

@cloudnautique I am not able to list gitlab repos directly. Wanted to confirm that it is expected. I have created 1 project which i cloned from gptscript repo.

Image

cloudnautique commented 2 weeks ago

In GitLab top levels are projects and repos belong to projects. It doesn't believe it knows enough to answer a question about a repo.

You can try adding some dynamic instructions:

#!sys.echo

When a user asks for Repos without a project reference, list all projects

Not sure if this should be in the base tool or not, since it is in the realm of assistant behavior.

cjellick commented 2 weeks ago

i agree - should not be in the tool.

sangee2004 commented 2 weeks ago

Adding the dynamic instructions to the assistant , results in listing the project details

Screenshot 2024-08-28 at 4 02 20 PM

@cjellick I did some very checks with gitlab like listing projects and then do some queries relating to latest commits , creating/commenting/closing issues in this project.

Can this issue be closed with these validations?