Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /amphetamarina_litellm /.github /workflows /locustfile.py
| from locust import HttpUser, task, between | |
| class MyUser(HttpUser): | |
| wait_time = between(1, 5) | |
| def chat_completion(self): | |
| headers = { | |
| "Content-Type": "application/json", | |
| "Authorization": "Bearer sk-8N1tLOOyH8TIxwOLahhIVg", | |
| # Include any additional headers you may need for authentication, etc. | |
| } | |
| # Customize the payload with "model" and "messages" keys | |
| payload = { | |
| "model": "fake-openai-endpoint", | |
| "messages": [ | |
| {"role": "system", "content": "You are a chat bot."}, | |
| {"role": "user", "content": "Hello, how are you?"}, | |
| ], | |
| # Add more data as necessary | |
| } | |
| # Make a POST request to the "chat/completions" endpoint | |
| response = self.client.post("chat/completions", json=payload, headers=headers) | |
| # Print or log the response if needed | |
Xet Storage Details
- Size:
- 928 Bytes
- Xet hash:
- b5c329f3a7cc78b577a1cc3729d06af0f4e2587066963ce7f1fd54fc54414712
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.