required=False,        ),    ],    guidelines="You're asked to rate the quality of the response and provide feedback.",)rg.init(    api_url=os.environ["ARGILLA_API_URL"],    api_key=os.environ["ARGILLA_API_KEY"],)dataset.push_to_argilla("langchain-dataset");üìå NOTE: at the moment, just the prompt-response pairs are supported as FeedbackDataset.fields, so the ArgillaCallbackHandler will just track the prompt i.e. the LLM input, and the response i.e. the LLM output.Tracking‚ÄãTo use the ArgillaCallbackHandler you can either use the following code, or just reproduce one of the examples presented in the following sections.from langchain.callbacks import ArgillaCallbackHandlerargilla_callback = ArgillaCallbackHandler(    dataset_name="langchain-dataset",    api_url=os.environ["ARGILLA_API_URL"],    api_key=os.environ["ARGILLA_API_KEY"],)Scenario 1: Tracking an LLM‚ÄãFirst, let's just run a single LLM a few times and capture the resulting prompt-response pairs in Argilla.from langchain.callbacks import ArgillaCallbackHandler, StdOutCallbackHandlerfrom langchain.llms import OpenAIargilla_callback = ArgillaCallbackHandler(    dataset_name="langchain-dataset",    api_url=os.environ["ARGILLA_API_URL"],    api_key=os.environ["ARGILLA_API_KEY"],)callbacks = [StdOutCallbackHandler(), argilla_callback]llm = OpenAI(temperature=0.9, callbacks=callbacks)llm.generate(["Tell me a joke", "Tell me a poem"] * 3)    LLMResult(generations=[[Generation(text='\n\nQ: What did the fish say when he hit the wall? \nA: Dam.', generation_info={'finish_reason': 'stop', 'logprobs': None})], [Generation(text='\n\nThe Moon \n\nThe moon is high in the midnight sky,\nSparkling like a star above.\nThe night so peaceful, so serene,\nFilling up the air with love.\n\nEver changing and renewing,\nA never-ending light of grace.\nThe moon remains a constant view,\nA reminder of life‚Äôs gentle pace.\n\nThrough time and space it guides us on,\nA never-fading beacon of hope.\nThe moon shines down
Argilla - Open-source data platform for LLMs
Argilla - Open-source data platform for LLMs ->: required=False,        ),    ],    guidelines="You're asked to rate the quality of the response and provide feedback.",)rg.init(    api_url=os.environ["ARGILLA_API_URL"],    api_key=os.environ["ARGILLA_API_KEY"],)dataset.push_to_argilla("langchain-dataset");üìå NOTE: at the moment, just the prompt-response pairs are supported as FeedbackDataset.fields, so the ArgillaCallbackHandler will just track the prompt i.e. the LLM input, and the response i.e. the LLM output.Tracking‚ÄãTo use the ArgillaCallbackHandler you can either use the following code, or just reproduce one of the examples presented in the following sections.from langchain.callbacks import ArgillaCallbackHandlerargilla_callback = ArgillaCallbackHandler(    dataset_name="langchain-dataset",    api_url=os.environ["ARGILLA_API_URL"],    api_key=os.environ["ARGILLA_API_KEY"],)Scenario 1: Tracking an LLM‚ÄãFirst, let's just run a single LLM a few times and capture the resulting prompt-response pairs in Argilla.from langchain.callbacks import ArgillaCallbackHandler, StdOutCallbackHandlerfrom langchain.llms import OpenAIargilla_callback = ArgillaCallbackHandler(    dataset_name="langchain-dataset",    api_url=os.environ["ARGILLA_API_URL"],    api_key=os.environ["ARGILLA_API_KEY"],)callbacks = [StdOutCallbackHandler(), argilla_callback]llm = OpenAI(temperature=0.9, callbacks=callbacks)llm.generate(["Tell me a joke", "Tell me a poem"] * 3)    LLMResult(generations=[[Generation(text='\n\nQ: What did the fish say when he hit the wall? \nA: Dam.', generation_info={'finish_reason': 'stop', 'logprobs': None})], [Generation(text='\n\nThe Moon \n\nThe moon is high in the midnight sky,\nSparkling like a star above.\nThe night so peaceful, so serene,\nFilling up the air with love.\n\nEver changing and renewing,\nA never-ending light of grace.\nThe moon remains a constant view,\nA reminder of life‚Äôs gentle pace.\n\nThrough time and space it guides us on,\nA never-fading beacon of hope.\nThe moon shines down