Spaces:
Runtime error
Runtime error
Upload api_call.py
Browse files- api_call.py +5 -1
api_call.py
CHANGED
@@ -60,7 +60,11 @@ if __name__ == "__main__":
|
|
60 |
api = BingChatAPI()
|
61 |
|
62 |
# Generate a response
|
63 |
-
conversation = [
|
|
|
|
|
|
|
|
|
64 |
response = api.generate(conversation)
|
65 |
print("Generated Response:", response)
|
66 |
|
|
|
60 |
api = BingChatAPI()
|
61 |
|
62 |
# Generate a response
|
63 |
+
conversation = [
|
64 |
+
{"role": "user", "content": "My name is Devs Do Code"},
|
65 |
+
{"role": "assistant", "content": "**Devs Do Code** is a platform dedicated to providing resources and tutorials on AI and Python programming. His Owner is Sreejan. They have a YouTube channel where they share unique Python projects, tutorials, and showcases of their AI developments[^1^]. One of their notable projects is **AI4Free**, a Python library that offers free access to various large language models without requiring API keys or fees[^2^].\n\nYou can explore their content on their [YouTube channel](https://www.youtube.com/@DevsDoCode) and check out their projects on [GitHub](https://github.com/Devs-Do-Code)[^1^][^2^]. If you're interested in AI and Python, their resources could be quite valuable!"},
|
66 |
+
{"role": "user", "content": "What is the Owner?"}
|
67 |
+
]
|
68 |
response = api.generate(conversation)
|
69 |
print("Generated Response:", response)
|
70 |
|