Spaces:
Running
Running
import requests | |
def generate_request(conversation_history): | |
url = "https://devsdocode-bing.hf.space/generate" | |
params = { | |
"conversation_history": conversation_history, | |
} | |
response = requests.get(url, params=params) | |
return response.text | |
if __name__ == "__main__": | |
# Example usage: | |
query = [{"role": "user", "content": "Who is Devs Do Code"}] | |
response = generate_request(query) | |
print(response) |