Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.camel-ai.org/llms.txt

Use this file to discover all available pages before exploring further.

ShareGPTDataCollector

class ShareGPTDataCollector(BaseDataCollector):

init

def __init__(self):

record

def record(self, agent: Union[List[ChatAgent], ChatAgent]):
Inject an agent into the data collector.

convert

def convert(self):
Convert the collected data into a dictionary.

llm_convert

def llm_convert(
    self,
    converter: Optional[OpenAISchemaConverter] = None,
    prompt: Optional[str] = None
):
Convert collected data using an LLM schema converter. Parameters:
  • converter (Optional[OpenAISchemaConverter], optional): The converter to use. (default: :obj:OpenAISchemaConverter)
  • prompt (Optional[str], optional): Prompt to guide the conversion. (default: :obj:DEFAULT_CONVERTER_PROMPTS)
Returns: Dict[str, str]: The converted data.

to_sharegpt_conversation

def to_sharegpt_conversation(data: Dict[str, Any]):