expectedparrot / edsl

Design, conduct and analyze results of AI-powered surveys and experiments. Simulate social science and market research with large numbers of AI agents and LLMs.
https://docs.expectedparrot.com
MIT License
184 stars 19 forks source link

Add the X AI/Grok API Option #892

Open nuozhou715 opened 2 months ago

nuozhou715 commented 2 months ago

Hi,

Thank you so much for this amazing software and your dedicated effort in solving people's issues here!

I am wondering if we could add the X AI API option to the system, as it seems to have some unique features compared to other LLMs that are worth a test. So far, only Grok-1 provides an API option, but they claim that the latest Grok-2 API should be available by the end of the month.

johnjosephhorton commented 2 months ago

Looks like it should be fairly easy to implement - they have an SDK here: https://developers.x.ai/python-sdk/chat/ @nuozhou715 Do you have an API key for the chat service (I don't)? I can create the connector in edsl and then you can test w/ your own key.

nuozhou715 commented 2 months ago

Thank you for your quick response!

Glad to know that this is not too hard to implement. They are reviewing my API access application. I will update you here once I have my key. Please let me know if you would like me to close this issue for now. Thanks