import asyncio
from heybee import AsyncHeyBee, ExperimentSpec, SampleInput
async def main() -> None:
async with AsyncHeyBee() as client:
evaluation = await client.create_evaluation(
ExperimentSpec(name='Response quality', type='text', requires_anchor=False)
)
await client.upload_samples(
evaluation.id,
[
SampleInput(text='Model A response', candidate_key='model-a'),
SampleInput(text='Model B response', candidate_key='model-b'),
],
)
link = await client.create_collection_link(evaluation.id)
print(f'Vote here: {link.voting_url}')
results = await client.get_results(evaluation.id)
print(results)
if __name__ == '__main__':
asyncio.run(main())