implementing initial LLM class

This commit is contained in:
João Moura
2024-09-22 22:37:29 -03:00
parent 000e2666fb
commit 18c3925fa3
15 changed files with 2217 additions and 47 deletions

View File

@@ -0,0 +1,101 @@
interactions:
- request:
body: '{"messages": [{"role": "user", "content": "Say ''Hello, World!'' and then
say STOP"}], "model": "gpt-3.5-turbo", "frequency_penalty": 0.1, "max_tokens":
50, "presence_penalty": 0.1, "stop": ["STOP"], "temperature": 0.7}'
headers:
accept:
- application/json
accept-encoding:
- gzip, deflate
connection:
- keep-alive
content-length:
- '217'
content-type:
- application/json
cookie:
- _cfuvid=FFmP82tY.BP0BFYwK4ix5zIa5fG5Ye7tnJ1DN70SSx4-1727048166266-0.0.1.1-604800000
host:
- api.openai.com
user-agent:
- OpenAI/Python 1.47.0
x-stainless-arch:
- arm64
x-stainless-async:
- 'false'
x-stainless-lang:
- python
x-stainless-os:
- MacOS
x-stainless-package-version:
- 1.47.0
x-stainless-raw-response:
- 'true'
x-stainless-runtime:
- CPython
x-stainless-runtime-version:
- 3.11.7
method: POST
uri: https://api.openai.com/v1/chat/completions
response:
content: "{\n \"id\": \"chatcmpl-AARioD9fe66arqP951Q6m1N5BgDqV\",\n \"object\":
\"chat.completion\",\n \"created\": 1727053206,\n \"model\": \"gpt-3.5-turbo-0125\",\n
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
\"assistant\",\n \"content\": \"Hello, World!\\n\",\n \"refusal\":
null\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n
\ }\n ],\n \"usage\": {\n \"prompt_tokens\": 17,\n \"completion_tokens\":
4,\n \"total_tokens\": 21,\n \"completion_tokens_details\": {\n \"reasoning_tokens\":
0\n }\n },\n \"system_fingerprint\": null\n}\n"
headers:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 8c76988ceede8759-MIA
Connection:
- keep-alive
Content-Encoding:
- gzip
Content-Type:
- application/json
Date:
- Mon, 23 Sep 2024 01:00:06 GMT
Server:
- cloudflare
Set-Cookie:
- __cf_bm=XKEjZqa9jLHDkJm09f6GoOFObGBsS.2iO2iQsVxfDtg-1727053206-1.0.1.1-AhT2h4tFAfFhcbWhI7x8he9L6T0eCndS2.n6pMSK3iFkx0qYlA5Y.iniDaQVaO1ukiEEoEJGaV2tL967WYm1uA;
path=/; expires=Mon, 23-Sep-24 01:30:06 GMT; domain=.api.openai.com; HttpOnly;
Secure; SameSite=None
- _cfuvid=ntPBCCgVUz_nq5Umsn4Dh2nras_FFFm.Om6wrSeiU00-1727053206899-0.0.1.1-604800000;
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
Transfer-Encoding:
- chunked
X-Content-Type-Options:
- nosniff
access-control-expose-headers:
- X-Request-ID
openai-organization:
- crewai-iuxna1
openai-processing-ms:
- '110'
openai-version:
- '2020-10-01'
strict-transport-security:
- max-age=15552000; includeSubDomains; preload
x-ratelimit-limit-requests:
- '10000'
x-ratelimit-limit-tokens:
- '50000000'
x-ratelimit-remaining-requests:
- '9999'
x-ratelimit-remaining-tokens:
- '49999938'
x-ratelimit-reset-requests:
- 6ms
x-ratelimit-reset-tokens:
- 0s
x-request-id:
- req_e2bb166ffe6d65c17da2b1d3afaef830
http_version: HTTP/1.1
status_code: 200
version: 1