Skip to content
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

ShareGPT Integration #62

Open
benjamin-kirkbride opened this issue Jun 23, 2023 · 5 comments
Open

ShareGPT Integration #62

benjamin-kirkbride opened this issue Jun 23, 2023 · 5 comments
Labels
help wanted Extra attention is needed plugins

Comments

@benjamin-kirkbride
Copy link
Contributor

Is this something we are open to?

https://github.com/domeccleston/sharegpt

@simonw
Copy link
Owner

simonw commented Jun 23, 2023

Oh interesting, you mean for publishing your prompts selectively?

I was just thinking earlier about whether or not a plugin hook for the log() feature would make sense:

It would actually be possible to build a plugin for this right now, using the new register_commands() plugin hook. It would end up working something like this:

llm install llm-sharegpt
llm sharegpt publish 313 # ID of a conversation to publish

@simonw simonw added the enhancement New feature or request label Jun 23, 2023
@simonw
Copy link
Owner

simonw commented Jun 23, 2023

This would actually make a really good example plugin, if someone wants to build it.

@simonw simonw added help wanted Extra attention is needed plugins and removed enhancement New feature or request labels Jun 23, 2023
@simonw
Copy link
Owner

simonw commented Jun 23, 2023

It looks like the best documentation for the JSON format that POST: https://sharegpt.com/api/conversations endpoint accepts is here: https://github.com/domeccleston/sharegpt/blob/b36ab4cb440c57b16801bbccd0a6ca0306e7c967/app/lib/types.ts#L1-L15

export interface ConversationProps {
  id: string;
  model?: string;
  content: {
    title?: string;
    avatarUrl: string;
    model?: string;
    items: {
      from: "human" | "gpt";
      value: string;
    }[];
  };
  comments: CommentProps[];
  views: number;
}

Where id is a 7 character random string - https://github.com/domeccleston/sharegpt/blob/b36ab4cb440c57b16801bbccd0a6ca0306e7c967/app/lib/utils.ts#L4-L7 - and avatarUrl is a base64 string JPEG image.

@benjamin-kirkbride
Copy link
Contributor Author

Oh interesting, you mean for publishing your prompts selectively?

Exactly!

@benjamin-kirkbride
Copy link
Contributor Author

I would consider making a plugin for this, we will see what my free time is like :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed plugins
Projects
None yet
Development

No branches or pull requests

2 participants