Bing / api_call.py
DevsDoCode's picture
Upload 6 files
1dccd50 verified
raw
history blame
449 Bytes
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)