From f8b7cbf9c16fee629670129c22c7e18233a1f463 Mon Sep 17 00:00:00 2001 From: Tomas Dvorak Date: Fri, 8 Mar 2024 11:16:18 +0100 Subject: [PATCH] chore: regenerate schemas and cassets --- src/genai/schema/_api.py | 22 ++++---- src/genai/schema/_endpoints.py | 18 +++---- ...TestLangChainChat.test_async_generate.yaml | 14 ++--- .../TestLangChainChat.test_generate.yaml | 13 +++-- .../TestLlamaIndex.test_llama_index_chat.yaml | 13 +++-- ...omptService.test_create_delete_prompt.yaml | 42 +++++++-------- ...st_create_retrieve_delete_chat_record.yaml | 36 ++++++------- .../TestChatService.test_create_history.yaml | 54 +++++++++---------- 8 files changed, 106 insertions(+), 106 deletions(-) diff --git a/src/genai/schema/_api.py b/src/genai/schema/_api.py index 4f491613..438cb707 100644 --- a/src/genai/schema/_api.py +++ b/src/genai/schema/_api.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: 2024-03-07_openapi_schema +# filename: 2024-03-08_openapi_schema from __future__ import annotations @@ -7,6 +7,7 @@ from enum import Enum from typing import Any, Literal, Optional, Union +import deprecated from pydantic import AwareDatetime, Field, RootModel from genai._types import ApiBaseModel @@ -758,11 +759,11 @@ class _PromptRetrieveParametersQuery(ApiBaseModel): context_window_min: Optional[int] = None context_window_max: Optional[int] = None folder_id: Optional[str] = None - version: Literal["2024-03-07"] = "2024-03-07" + version: Literal["2024-03-08"] = "2024-03-08" class _PromptCreateParametersQuery(ApiBaseModel): - version: Literal["2024-03-07"] = "2024-03-07" + version: Literal["2024-03-08"] = "2024-03-08" class _PromptIdDeleteParametersQuery(ApiBaseModel): @@ -770,11 +771,11 @@ class _PromptIdDeleteParametersQuery(ApiBaseModel): class _PromptIdRetrieveParametersQuery(ApiBaseModel): - version: Literal["2024-03-07"] = "2024-03-07" + version: Literal["2024-03-08"] = "2024-03-08" class _PromptIdPatchParametersQuery(ApiBaseModel): - version: Literal["2024-03-07"] = "2024-03-07" + version: Literal["2024-03-08"] = "2024-03-08" class _PromptIdPatchRequest(ApiBaseModel): @@ -784,7 +785,7 @@ class _PromptIdPatchRequest(ApiBaseModel): class _PromptIdUpdateParametersQuery(ApiBaseModel): - version: Literal["2024-03-07"] = "2024-03-07" + version: Literal["2024-03-08"] = "2024-03-08" class _RequestRetrieveParametersQuery(ApiBaseModel): @@ -805,7 +806,7 @@ class _RequestChatConversationIdDeleteParametersQuery(ApiBaseModel): class _RequestChatConversationIdRetrieveParametersQuery(ApiBaseModel): - version: Literal["2024-03-07"] = "2024-03-07" + version: Literal["2024-03-08"] = "2024-03-08" class _RequestIdDeleteParametersQuery(ApiBaseModel): @@ -887,11 +888,11 @@ class TaskRetrieveResponse(ApiBaseModel): class _TextChatCreateParametersQuery(ApiBaseModel): - version: Literal["2024-03-07"] = "2024-03-07" + version: Literal["2024-03-08"] = "2024-03-08" class _TextChatOutputCreateParametersQuery(ApiBaseModel): - version: Literal["2024-03-07"] = "2024-03-07" + version: Literal["2024-03-08"] = "2024-03-08" class TextChatOutputCreateResponse(ApiBaseModel): @@ -899,7 +900,7 @@ class TextChatOutputCreateResponse(ApiBaseModel): class _TextChatStreamCreateParametersQuery(ApiBaseModel): - version: Literal["2024-03-07"] = "2024-03-07" + version: Literal["2024-03-08"] = "2024-03-08" class _TextEmbeddingCreateParametersQuery(ApiBaseModel): @@ -1115,6 +1116,7 @@ class BaseMessage(ApiBaseModel): def file_ids(self) -> Optional[list[str]]: return [file.id for file in self.files] if self.files is not None else None + class BaseTokens(ApiBaseModel): logprob: Optional[Union[float, str]] = None rank: Optional[int] = None diff --git a/src/genai/schema/_endpoints.py b/src/genai/schema/_endpoints.py index f70c1063..dfff12ef 100644 --- a/src/genai/schema/_endpoints.py +++ b/src/genai/schema/_endpoints.py @@ -123,13 +123,13 @@ class ModelIdRetrieveEndpoint(ApiEndpoint): class PromptRetrieveEndpoint(ApiEndpoint): path: str = "/v2/prompts" method: str = "GET" - version: str = "2024-03-07" + version: str = "2024-03-08" class PromptCreateEndpoint(ApiEndpoint): path: str = "/v2/prompts" method: str = "POST" - version: str = "2024-03-07" + version: str = "2024-03-08" class PromptIdDeleteEndpoint(ApiEndpoint): @@ -141,19 +141,19 @@ class PromptIdDeleteEndpoint(ApiEndpoint): class PromptIdRetrieveEndpoint(ApiEndpoint): path: str = "/v2/prompts/{id}" method: str = "GET" - version: str = "2024-03-07" + version: str = "2024-03-08" class PromptIdPatchEndpoint(ApiEndpoint): path: str = "/v2/prompts/{id}" method: str = "PATCH" - version: str = "2024-03-07" + version: str = "2024-03-08" class PromptIdUpdateEndpoint(ApiEndpoint): path: str = "/v2/prompts/{id}" method: str = "PUT" - version: str = "2024-03-07" + version: str = "2024-03-08" class RequestRetrieveEndpoint(ApiEndpoint): @@ -171,7 +171,7 @@ class RequestChatConversationIdDeleteEndpoint(ApiEndpoint): class RequestChatConversationIdRetrieveEndpoint(ApiEndpoint): path: str = "/v2/requests/chat/{conversation_id}" method: str = "GET" - version: str = "2024-03-07" + version: str = "2024-03-08" class RequestIdDeleteEndpoint(ApiEndpoint): @@ -243,19 +243,19 @@ class TaskRetrieveEndpoint(ApiEndpoint): class TextChatCreateEndpoint(ApiEndpoint): path: str = "/v2/text/chat" method: str = "POST" - version: str = "2024-03-07" + version: str = "2024-03-08" class TextChatOutputCreateEndpoint(ApiEndpoint): path: str = "/v2/text/chat/output" method: str = "POST" - version: str = "2024-03-07" + version: str = "2024-03-08" class TextChatStreamCreateEndpoint(ApiEndpoint): path: str = "/v2/text/chat_stream" method: str = "POST" - version: str = "2024-03-07" + version: str = "2024-03-08" class TextEmbeddingCreateEndpoint(ApiEndpoint): diff --git a/tests/integration/extensions/cassettes/test_langchain_chat/TestLangChainChat.test_async_generate.yaml b/tests/integration/extensions/cassettes/test_langchain_chat/TestLangChainChat.test_async_generate.yaml index 7a20e680..9b159b8f 100644 --- a/tests/integration/extensions/cassettes/test_langchain_chat/TestLangChainChat.test_async_generate.yaml +++ b/tests/integration/extensions/cassettes/test_langchain_chat/TestLangChainChat.test_async_generate.yaml @@ -21,25 +21,25 @@ interactions: content-type: - application/json method: POST - uri: https://api.com/v2/text/chat?version=2024-03-07 + uri: https://api.com/v2/text/chat?version=2024-03-08 response: body: - string: '{"id":"bff5b848-58ba-4e57-a992-bb87e5260907","model_id":"meta-llama/llama-2-70b-chat","created_at":"2024-03-07T20:36:50.483Z","results":[{"generated_text":" NLP - stands for Natural Language Processing, which is a subfield of artificial - intelligence (AI","generated_token_count":20,"input_token_count":160,"stop_reason":"max_tokens","seed":849980025}],"conversation_id":"ad33c6da-2eb9-4b94-9fdb-74159787cd7b"}' + string: '{"id":"9592661d-c493-41b2-a620-0212b44cf99f","model_id":"meta-llama/llama-2-70b-chat","created_at":"2024-03-08T10:10:56.768Z","results":[{"generated_text":" NLP + (Natural Language Processing) is a subfield of artificial intelligence that + deals","generated_token_count":20,"input_token_count":160,"stop_reason":"max_tokens","seed":1977231784}],"conversation_id":"ff7370ed-d9d9-4140-a232-64a9a46f3149"}' headers: Connection: - keep-alive Date: - - Thu, 07 Mar 2024 20:36:50 GMT + - Fri, 08 Mar 2024 10:10:56 GMT Keep-Alive: - timeout=72 content-length: - - '408' + - '400' content-type: - application/json; charset=utf-8 content-version: - - '2024-03-07' + - '2024-03-08' vary: - accept-encoding status: diff --git a/tests/integration/extensions/cassettes/test_langchain_chat/TestLangChainChat.test_generate.yaml b/tests/integration/extensions/cassettes/test_langchain_chat/TestLangChainChat.test_generate.yaml index ef90a3d2..1f865281 100644 --- a/tests/integration/extensions/cassettes/test_langchain_chat/TestLangChainChat.test_generate.yaml +++ b/tests/integration/extensions/cassettes/test_langchain_chat/TestLangChainChat.test_generate.yaml @@ -21,25 +21,24 @@ interactions: content-type: - application/json method: POST - uri: https://api.com/v2/text/chat?version=2024-03-07 + uri: https://api.com/v2/text/chat?version=2024-03-08 response: body: - string: '{"id":"3b81c8d5-03e3-4163-ad42-03b7b3e334dc","model_id":"meta-llama/llama-2-70b-chat","created_at":"2024-03-07T20:36:48.611Z","results":[{"generated_text":" NLP - stands for Natural Language Processing, which is a subfield of artificial - intelligence (AI","generated_token_count":20,"input_token_count":160,"stop_reason":"max_tokens","seed":2807329282}],"conversation_id":"c7c2f0d2-e101-4edd-8ada-2a8161b949ee"}' + string: '{"id":"3f18b293-c165-4c41-a621-3d95eddc79ad","model_id":"meta-llama/llama-2-70b-chat","created_at":"2024-03-08T10:10:55.181Z","results":[{"generated_text":" NLP + (Natural Language Processing) is a subfield of artificial intelligence (AI)","generated_token_count":20,"input_token_count":160,"stop_reason":"max_tokens","seed":4249717828}],"conversation_id":"fb0a5b46-0f0b-4a3e-ad2e-f555e3f66dee"}' headers: Connection: - keep-alive Date: - - Thu, 07 Mar 2024 20:36:48 GMT + - Fri, 08 Mar 2024 10:10:55 GMT Keep-Alive: - timeout=72 content-length: - - '409' + - '394' content-type: - application/json; charset=utf-8 content-version: - - '2024-03-07' + - '2024-03-08' vary: - accept-encoding status: diff --git a/tests/integration/extensions/cassettes/test_llama_index/TestLlamaIndex.test_llama_index_chat.yaml b/tests/integration/extensions/cassettes/test_llama_index/TestLlamaIndex.test_llama_index_chat.yaml index 1b6f40f5..8d1709f9 100644 --- a/tests/integration/extensions/cassettes/test_llama_index/TestLlamaIndex.test_llama_index_chat.yaml +++ b/tests/integration/extensions/cassettes/test_llama_index/TestLlamaIndex.test_llama_index_chat.yaml @@ -21,25 +21,24 @@ interactions: content-type: - application/json method: POST - uri: https://api.com/v2/text/chat?version=2024-03-07 + uri: https://api.com/v2/text/chat?version=2024-03-08 response: body: - string: '{"id":"6f50b684-9cc2-416b-9787-f3323d8cf04c","model_id":"google/flan-ul2","created_at":"2024-03-07T20:36:52.200Z","results":[{"generated_text":"Neuro-linguistic - programming started in the 1970s and has been improved upon for accuracy until - present.","generated_token_count":20,"input_token_count":130,"stop_reason":"eos_token","seed":2268274874}],"conversation_id":"955f726f-8365-466c-896b-638316fed9b6"}' + string: '{"id":"f13b63bb-5ed9-487d-8645-37a13013eb31","model_id":"google/flan-ul2","created_at":"2024-03-08T10:11:01.143Z","results":[{"generated_text":"The + acronym is for Neuro-Linguistic Programming. Basically, it is a","generated_token_count":20,"input_token_count":130,"stop_reason":"max_tokens","seed":2852319478}],"conversation_id":"d6bf8ef4-73e6-410c-8271-aa3f03d56695"}' headers: Connection: - keep-alive Date: - - Thu, 07 Mar 2024 20:36:52 GMT + - Fri, 08 Mar 2024 10:11:01 GMT Keep-Alive: - timeout=72 content-length: - - '404' + - '368' content-type: - application/json; charset=utf-8 content-version: - - '2024-03-07' + - '2024-03-08' vary: - accept-encoding status: diff --git a/tests/integration/prompt/cassettes/test_prompt_service/TestPromptService.test_create_delete_prompt.yaml b/tests/integration/prompt/cassettes/test_prompt_service/TestPromptService.test_create_delete_prompt.yaml index ab8e2ff9..1bcb8d65 100644 --- a/tests/integration/prompt/cassettes/test_prompt_service/TestPromptService.test_create_delete_prompt.yaml +++ b/tests/integration/prompt/cassettes/test_prompt_service/TestPromptService.test_create_delete_prompt.yaml @@ -15,16 +15,16 @@ interactions: content-type: - application/json method: POST - uri: https://api.com/v2/prompts?version=2024-03-07 + uri: https://api.com/v2/prompts?version=2024-03-08 response: body: - string: '{"result":{"id":"vCZvuCZtZDgwJlrb","name":"My test prompt","data":{"meal":"goulash","author":"Shakespeare"},"input":"Write - the recipe for {{meal}} in the style of {{author}}","model_id":"google/flan-t5-xl","moderations":{},"created_at":"2024-03-07T20:39:11.000Z","updated_at":"2024-03-07T20:39:11.000Z","type":"private","public":false,"metadata":{"keywords":["meal","author"]},"tags":[],"author":{"id":453,"first_name":"Tomas","last_name":"Dvorak"},"usage_count":0}}' + string: '{"result":{"id":"z3zdiD5b9UWISxOT","name":"My test prompt","data":{"meal":"goulash","author":"Shakespeare"},"input":"Write + the recipe for {{meal}} in the style of {{author}}","model_id":"google/flan-t5-xl","moderations":{},"created_at":"2024-03-08T10:11:03.000Z","updated_at":"2024-03-08T10:11:03.000Z","type":"private","public":false,"metadata":{"keywords":["meal","author"]},"tags":[],"author":{"id":453,"first_name":"Tomas","last_name":"Dvorak"},"usage_count":0}}' headers: Connection: - keep-alive Date: - - Thu, 07 Mar 2024 20:39:11 GMT + - Fri, 08 Mar 2024 10:11:02 GMT Keep-Alive: - timeout=72 content-length: @@ -32,7 +32,7 @@ interactions: content-type: - application/json; charset=utf-8 content-version: - - '2024-03-07' + - '2024-03-08' vary: - accept-encoding x-ratelimit-limit: @@ -54,16 +54,16 @@ interactions: connection: - keep-alive method: GET - uri: https://api.com/v2/prompts/vCZvuCZtZDgwJlrb?version=2024-03-07 + uri: https://api.com/v2/prompts/z3zdiD5b9UWISxOT?version=2024-03-08 response: body: - string: '{"result":{"id":"vCZvuCZtZDgwJlrb","name":"My test prompt","data":{"meal":"goulash","author":"Shakespeare"},"input":"Write - the recipe for {{meal}} in the style of {{author}}","model_id":"google/flan-t5-xl","moderations":{},"created_at":"2024-03-07T20:39:11.000Z","updated_at":"2024-03-07T20:39:11.000Z","type":"private","public":false,"metadata":{"keywords":["meal","author"]},"tags":[],"author":{"id":453,"first_name":"Tomas","last_name":"Dvorak"},"usage_count":0}}' + string: '{"result":{"id":"z3zdiD5b9UWISxOT","name":"My test prompt","data":{"meal":"goulash","author":"Shakespeare"},"input":"Write + the recipe for {{meal}} in the style of {{author}}","model_id":"google/flan-t5-xl","moderations":{},"created_at":"2024-03-08T10:11:03.000Z","updated_at":"2024-03-08T10:11:03.000Z","type":"private","public":false,"metadata":{"keywords":["meal","author"]},"tags":[],"author":{"id":453,"first_name":"Tomas","last_name":"Dvorak"},"usage_count":0}}' headers: Connection: - keep-alive Date: - - Thu, 07 Mar 2024 20:39:12 GMT + - Fri, 08 Mar 2024 10:11:03 GMT Keep-Alive: - timeout=72 content-length: @@ -71,7 +71,7 @@ interactions: content-type: - application/json; charset=utf-8 content-version: - - '2024-03-07' + - '2024-03-08' vary: - accept-encoding x-ratelimit-limit: @@ -86,7 +86,7 @@ interactions: - request: body: '{"parameters": {"return_options": {"generated_tokens": false, "input_text": true, "input_tokens": false, "token_logprobs": false, "token_ranks": false}}, - "prompt_id": "vCZvuCZtZDgwJlrb"}' + "prompt_id": "z3zdiD5b9UWISxOT"}' headers: accept: - '*/*' @@ -102,18 +102,18 @@ interactions: uri: https://api.com/v2/text/generation?version=2024-01-10 response: body: - string: '{"id":"ecc40ac1-a6a8-4362-8d68-3c792ead185f","model_id":"google/flan-t5-xl","created_at":"2024-03-07T20:39:13.793Z","results":[{"input_text":"Write - the recipe for goulash in the style of Shakespeare","generated_text":"]]] - >Prepare beef 2, carrots 1 onion 1 teaspoon salt, 1.5 tablespoon","generated_token_count":20,"input_token_count":13,"stop_reason":"max_tokens","seed":2802486288}]}' + string: '{"id":"3fe1a514-7184-4c36-9156-c693ca351201","model_id":"google/flan-t5-xl","created_at":"2024-03-08T10:11:04.673Z","results":[{"input_text":"Write + the recipe for goulash in the style of Shakespeare","generated_text":"Of course. + With the Lamb here, you might as well go quick and easy with Lamb Cutlets","generated_token_count":20,"input_token_count":13,"stop_reason":"max_tokens","seed":348397510}]}' headers: Connection: - keep-alive Date: - - Thu, 07 Mar 2024 20:39:13 GMT + - Fri, 08 Mar 2024 10:11:04 GMT Keep-Alive: - timeout=72 content-length: - - '385' + - '400' content-type: - application/json; charset=utf-8 content-version: @@ -133,7 +133,7 @@ interactions: connection: - keep-alive method: DELETE - uri: https://api.com/v2/prompts/vCZvuCZtZDgwJlrb?version=2023-11-22 + uri: https://api.com/v2/prompts/z3zdiD5b9UWISxOT?version=2023-11-22 response: body: string: '' @@ -141,7 +141,7 @@ interactions: Connection: - keep-alive Date: - - Thu, 07 Mar 2024 20:39:14 GMT + - Fri, 08 Mar 2024 10:11:08 GMT Keep-Alive: - timeout=72 content-version: @@ -165,7 +165,7 @@ interactions: connection: - keep-alive method: GET - uri: https://api.com/v2/prompts?search=My%20test%20prompt&model_id=google%2Fflan-t5-xl&version=2024-03-07 + uri: https://api.com/v2/prompts?search=My%20test%20prompt&model_id=google%2Fflan-t5-xl&version=2024-03-08 response: body: string: '{"results":[],"total_count":0}' @@ -173,7 +173,7 @@ interactions: Connection: - keep-alive Date: - - Thu, 07 Mar 2024 20:39:15 GMT + - Fri, 08 Mar 2024 10:11:09 GMT Keep-Alive: - timeout=72 content-length: @@ -181,7 +181,7 @@ interactions: content-type: - application/json; charset=utf-8 content-version: - - '2024-03-07' + - '2024-03-08' vary: - accept-encoding x-ratelimit-limit: diff --git a/tests/integration/request/cassettes/test_request_service/TestRequestService.test_create_retrieve_delete_chat_record.yaml b/tests/integration/request/cassettes/test_request_service/TestRequestService.test_create_retrieve_delete_chat_record.yaml index 8e1431a7..fba25bb8 100644 --- a/tests/integration/request/cassettes/test_request_service/TestRequestService.test_create_retrieve_delete_chat_record.yaml +++ b/tests/integration/request/cassettes/test_request_service/TestRequestService.test_create_retrieve_delete_chat_record.yaml @@ -14,24 +14,24 @@ interactions: content-type: - application/json method: POST - uri: https://api.com/v2/text/chat?version=2024-03-07 + uri: https://api.com/v2/text/chat?version=2024-03-08 response: body: - string: '{"id":"f1a2b95c-e1f2-4e42-9fac-b6168d092b0c","model_id":"google/flan-t5-xl","created_at":"2024-03-07T20:36:57.874Z","results":[{"generated_text":"All - right, what can I do for you?","generated_token_count":10,"input_token_count":15,"stop_reason":"max_tokens","seed":3334987880}],"conversation_id":"b5210561-d28c-42c3-a1e7-d118b2649225"}' + string: '{"id":"26f19e2f-c3d7-407f-a098-e3f210a26f6a","model_id":"google/flan-t5-xl","created_at":"2024-03-08T10:11:11.345Z","results":[{"generated_text":"Yes + You are very beautiful young lady, I like","generated_token_count":10,"input_token_count":15,"stop_reason":"max_tokens","seed":3435574986}],"conversation_id":"8ab8243a-785e-4aae-95ce-233a32600caa"}' headers: Connection: - keep-alive Date: - - Thu, 07 Mar 2024 20:36:57 GMT + - Fri, 08 Mar 2024 10:11:11 GMT Keep-Alive: - timeout=72 content-length: - - '335' + - '347' content-type: - application/json; charset=utf-8 content-version: - - '2024-03-07' + - '2024-03-08' vary: - accept-encoding status: @@ -47,25 +47,25 @@ interactions: connection: - keep-alive method: GET - uri: https://api.com/v2/requests/chat/b5210561-d28c-42c3-a1e7-d118b2649225?version=2024-03-07 + uri: https://api.com/v2/requests/chat/8ab8243a-785e-4aae-95ce-233a32600caa?version=2024-03-08 response: body: - string: '{"results":[{"id":"f1a2b95c-e1f2-4e42-9fac-b6168d092b0c","duration":356,"request":{"messages":[{"role":"user","content":"Hello - Marvin, how are you today?"}],"model_id":"google/flan-t5-xl","parameters":{"max_new_tokens":10},"conversation_id":"b5210561-d28c-42c3-a1e7-d118b2649225"},"status":"success","created_at":"2024-03-07T20:36:58.000Z","response":{"id":"f1a2b95c-e1f2-4e42-9fac-b6168d092b0c","results":[{"seed":3334987880,"stop_reason":"max_tokens","generated_text":"All - right, what can I do for you?","input_token_count":15,"generated_token_count":10}],"model_id":"google/flan-t5-xl","created_at":"2024-03-07T20:36:57.874Z","conversation_id":"b5210561-d28c-42c3-a1e7-d118b2649225"},"version":{"api":"v2","date":"2024-03-07"}}]}' + string: '{"results":[{"id":"26f19e2f-c3d7-407f-a098-e3f210a26f6a","duration":405,"request":{"messages":[{"role":"user","content":"Hello + Marvin, how are you today?"}],"model_id":"google/flan-t5-xl","parameters":{"max_new_tokens":10},"conversation_id":"8ab8243a-785e-4aae-95ce-233a32600caa"},"status":"success","created_at":"2024-03-08T10:11:11.000Z","response":{"id":"26f19e2f-c3d7-407f-a098-e3f210a26f6a","results":[{"seed":3435574986,"stop_reason":"max_tokens","generated_text":"Yes + You are very beautiful young lady, I like","input_token_count":15,"generated_token_count":10}],"model_id":"google/flan-t5-xl","created_at":"2024-03-08T10:11:11.345Z","conversation_id":"8ab8243a-785e-4aae-95ce-233a32600caa"},"version":{"api":"v2","date":"2024-03-08"}}]}' headers: Connection: - keep-alive Date: - - Thu, 07 Mar 2024 20:36:58 GMT + - Fri, 08 Mar 2024 10:11:12 GMT Keep-Alive: - timeout=72 content-length: - - '732' + - '744' content-type: - application/json; charset=utf-8 content-version: - - '2024-03-07' + - '2024-03-08' vary: - accept-encoding x-ratelimit-limit: @@ -87,7 +87,7 @@ interactions: connection: - keep-alive method: DELETE - uri: https://api.com/v2/requests/chat/b5210561-d28c-42c3-a1e7-d118b2649225?version=2023-11-22 + uri: https://api.com/v2/requests/chat/8ab8243a-785e-4aae-95ce-233a32600caa?version=2023-11-22 response: body: string: '' @@ -95,7 +95,7 @@ interactions: Connection: - keep-alive Date: - - Thu, 07 Mar 2024 20:36:59 GMT + - Fri, 08 Mar 2024 10:11:13 GMT Keep-Alive: - timeout=72 content-length: @@ -121,7 +121,7 @@ interactions: connection: - keep-alive method: GET - uri: https://api.com/v2/requests/chat/b5210561-d28c-42c3-a1e7-d118b2649225?version=2024-03-07 + uri: https://api.com/v2/requests/chat/8ab8243a-785e-4aae-95ce-233a32600caa?version=2024-03-08 response: body: string: '{"results":[]}' @@ -129,7 +129,7 @@ interactions: Connection: - keep-alive Date: - - Thu, 07 Mar 2024 20:37:00 GMT + - Fri, 08 Mar 2024 10:11:14 GMT Keep-Alive: - timeout=72 content-length: @@ -137,7 +137,7 @@ interactions: content-type: - application/json; charset=utf-8 content-version: - - '2024-03-07' + - '2024-03-08' vary: - accept-encoding x-ratelimit-limit: diff --git a/tests/integration/text/cassettes/test_chat_service/TestChatService.test_create_history.yaml b/tests/integration/text/cassettes/test_chat_service/TestChatService.test_create_history.yaml index d04ffc59..d18e1226 100644 --- a/tests/integration/text/cassettes/test_chat_service/TestChatService.test_create_history.yaml +++ b/tests/integration/text/cassettes/test_chat_service/TestChatService.test_create_history.yaml @@ -14,16 +14,16 @@ interactions: content-type: - application/json method: POST - uri: https://api.com/v2/text/chat?version=2024-03-07 + uri: https://api.com/v2/text/chat?version=2024-03-08 response: body: - string: '{"id":"acdd4c67-e5a9-41a7-b56a-9ad3f28dec94","model_id":"meta-llama/llama-2-70b-chat","created_at":"2024-03-07T20:37:02.059Z","results":[{"generated_text":" No, - I do not want to destroy the world. As a responsible AI language model,","generated_token_count":20,"input_token_count":18,"stop_reason":"max_tokens","seed":1668056241}],"conversation_id":"01c71f63-22af-4748-916a-f57501237bff"}' + string: '{"id":"13d3ecbb-507b-41ba-988a-ce67a30e480f","model_id":"meta-llama/llama-2-70b-chat","created_at":"2024-03-08T10:11:15.750Z","results":[{"generated_text":" No, + I do not want to destroy the world. As a responsible AI language model,","generated_token_count":20,"input_token_count":18,"stop_reason":"max_tokens","seed":3151377773}],"conversation_id":"ed68003c-8cc5-4f22-8f50-53475a08cef0"}' headers: Connection: - keep-alive Date: - - Thu, 07 Mar 2024 20:37:02 GMT + - Fri, 08 Mar 2024 10:11:15 GMT Keep-Alive: - timeout=72 content-length: @@ -31,7 +31,7 @@ interactions: content-type: - application/json; charset=utf-8 content-version: - - '2024-03-07' + - '2024-03-08' vary: - accept-encoding status: @@ -47,25 +47,25 @@ interactions: connection: - keep-alive method: GET - uri: https://api.com/v2/requests/chat/01c71f63-22af-4748-916a-f57501237bff?version=2024-03-07 + uri: https://api.com/v2/requests/chat/ed68003c-8cc5-4f22-8f50-53475a08cef0?version=2024-03-08 response: body: - string: '{"results":[{"id":"acdd4c67-e5a9-41a7-b56a-9ad3f28dec94","duration":1044,"request":{"messages":[{"role":"user","content":"Do - you want to destroy the world?"}],"model_id":"meta-llama/llama-2-70b-chat","conversation_id":"01c71f63-22af-4748-916a-f57501237bff"},"status":"success","created_at":"2024-03-07T20:37:02.000Z","response":{"id":"acdd4c67-e5a9-41a7-b56a-9ad3f28dec94","results":[{"seed":1668056241,"stop_reason":"max_tokens","generated_text":" No, - I do not want to destroy the world. As a responsible AI language model,","input_token_count":18,"generated_token_count":20}],"model_id":"meta-llama/llama-2-70b-chat","created_at":"2024-03-07T20:37:02.059Z","conversation_id":"01c71f63-22af-4748-916a-f57501237bff"},"version":{"api":"v2","date":"2024-03-07"}}]}' + string: '{"results":[{"id":"13d3ecbb-507b-41ba-988a-ce67a30e480f","duration":882,"request":{"messages":[{"role":"user","content":"Do + you want to destroy the world?"}],"model_id":"meta-llama/llama-2-70b-chat","conversation_id":"ed68003c-8cc5-4f22-8f50-53475a08cef0"},"status":"success","created_at":"2024-03-08T10:11:16.000Z","response":{"id":"13d3ecbb-507b-41ba-988a-ce67a30e480f","results":[{"seed":3151377773,"stop_reason":"max_tokens","generated_text":" No, + I do not want to destroy the world. As a responsible AI language model,","input_token_count":18,"generated_token_count":20}],"model_id":"meta-llama/llama-2-70b-chat","created_at":"2024-03-08T10:11:15.750Z","conversation_id":"ed68003c-8cc5-4f22-8f50-53475a08cef0"},"version":{"api":"v2","date":"2024-03-08"}}]}' headers: Connection: - keep-alive Date: - - Thu, 07 Mar 2024 20:37:02 GMT + - Fri, 08 Mar 2024 10:11:17 GMT Keep-Alive: - timeout=72 content-length: - - '763' + - '762' content-type: - application/json; charset=utf-8 content-version: - - '2024-03-07' + - '2024-03-08' vary: - accept-encoding x-ratelimit-limit: @@ -78,7 +78,7 @@ interactions: code: 200 message: OK - request: - body: '{"conversation_id": "01c71f63-22af-4748-916a-f57501237bff", "messages": + body: '{"conversation_id": "ed68003c-8cc5-4f22-8f50-53475a08cef0", "messages": [{"content": "What was my previous question?", "role": "user"}], "model_id": "meta-llama/llama-2-70b-chat"}' headers: @@ -93,24 +93,24 @@ interactions: content-type: - application/json method: POST - uri: https://api.com/v2/text/chat?version=2024-03-07 + uri: https://api.com/v2/text/chat?version=2024-03-08 response: body: - string: '{"id":"0db1e3d5-85c3-4528-ad9d-a286afb300f9","model_id":"meta-llama/llama-2-70b-chat","created_at":"2024-03-07T20:37:04.536Z","results":[{"generated_text":" Sure! - Your previous question was: Do you want to destroy the world?","generated_token_count":17,"input_token_count":52,"stop_reason":"eos_token","seed":139669190}],"conversation_id":"01c71f63-22af-4748-916a-f57501237bff"}' + string: '{"id":"4ff32c96-cf5a-4637-905a-cb1b6ab698b5","model_id":"meta-llama/llama-2-70b-chat","created_at":"2024-03-08T10:11:18.877Z","results":[{"generated_text":" Sure! + Your previous question was: Do you want to destroy the world?","generated_token_count":17,"input_token_count":52,"stop_reason":"eos_token","seed":3355361350}],"conversation_id":"ed68003c-8cc5-4f22-8f50-53475a08cef0"}' headers: Connection: - keep-alive Date: - - Thu, 07 Mar 2024 20:37:04 GMT + - Fri, 08 Mar 2024 10:11:18 GMT Keep-Alive: - timeout=72 content-length: - - '379' + - '380' content-type: - application/json; charset=utf-8 content-version: - - '2024-03-07' + - '2024-03-08' vary: - accept-encoding status: @@ -126,19 +126,19 @@ interactions: connection: - keep-alive method: GET - uri: https://api.com/v2/requests/chat/01c71f63-22af-4748-916a-f57501237bff?version=2024-03-07 + uri: https://api.com/v2/requests/chat/ed68003c-8cc5-4f22-8f50-53475a08cef0?version=2024-03-08 response: body: - string: '{"results":[{"id":"acdd4c67-e5a9-41a7-b56a-9ad3f28dec94","duration":1044,"request":{"messages":[{"role":"user","content":"Do - you want to destroy the world?"}],"model_id":"meta-llama/llama-2-70b-chat","conversation_id":"01c71f63-22af-4748-916a-f57501237bff"},"status":"success","created_at":"2024-03-07T20:37:02.000Z","response":{"id":"acdd4c67-e5a9-41a7-b56a-9ad3f28dec94","results":[{"seed":1668056241,"stop_reason":"max_tokens","generated_text":" No, - I do not want to destroy the world. As a responsible AI language model,","input_token_count":18,"generated_token_count":20}],"model_id":"meta-llama/llama-2-70b-chat","created_at":"2024-03-07T20:37:02.059Z","conversation_id":"01c71f63-22af-4748-916a-f57501237bff"},"version":{"api":"v2","date":"2024-03-07"}},{"id":"0db1e3d5-85c3-4528-ad9d-a286afb300f9","duration":891,"request":{"messages":[{"role":"user","content":"What - was my previous question?"}],"model_id":"meta-llama/llama-2-70b-chat","parent_id":"acdd4c67-e5a9-41a7-b56a-9ad3f28dec94","conversation_id":"01c71f63-22af-4748-916a-f57501237bff"},"status":"success","created_at":"2024-03-07T20:37:05.000Z","response":{"id":"0db1e3d5-85c3-4528-ad9d-a286afb300f9","results":[{"seed":139669190,"stop_reason":"eos_token","generated_text":" Sure! - Your previous question was: Do you want to destroy the world?","input_token_count":52,"generated_token_count":17}],"model_id":"meta-llama/llama-2-70b-chat","created_at":"2024-03-07T20:37:04.536Z","conversation_id":"01c71f63-22af-4748-916a-f57501237bff"},"parent_id":"acdd4c67-e5a9-41a7-b56a-9ad3f28dec94","version":{"api":"v2","date":"2024-03-07"}}]}' + string: '{"results":[{"id":"13d3ecbb-507b-41ba-988a-ce67a30e480f","duration":882,"request":{"messages":[{"role":"user","content":"Do + you want to destroy the world?"}],"model_id":"meta-llama/llama-2-70b-chat","conversation_id":"ed68003c-8cc5-4f22-8f50-53475a08cef0"},"status":"success","created_at":"2024-03-08T10:11:16.000Z","response":{"id":"13d3ecbb-507b-41ba-988a-ce67a30e480f","results":[{"seed":3151377773,"stop_reason":"max_tokens","generated_text":" No, + I do not want to destroy the world. As a responsible AI language model,","input_token_count":18,"generated_token_count":20}],"model_id":"meta-llama/llama-2-70b-chat","created_at":"2024-03-08T10:11:15.750Z","conversation_id":"ed68003c-8cc5-4f22-8f50-53475a08cef0"},"version":{"api":"v2","date":"2024-03-08"}},{"id":"4ff32c96-cf5a-4637-905a-cb1b6ab698b5","duration":884,"request":{"messages":[{"role":"user","content":"What + was my previous question?"}],"model_id":"meta-llama/llama-2-70b-chat","parent_id":"13d3ecbb-507b-41ba-988a-ce67a30e480f","conversation_id":"ed68003c-8cc5-4f22-8f50-53475a08cef0"},"status":"success","created_at":"2024-03-08T10:11:19.000Z","response":{"id":"4ff32c96-cf5a-4637-905a-cb1b6ab698b5","results":[{"seed":3355361350,"stop_reason":"eos_token","generated_text":" Sure! + Your previous question was: Do you want to destroy the world?","input_token_count":52,"generated_token_count":17}],"model_id":"meta-llama/llama-2-70b-chat","created_at":"2024-03-08T10:11:18.877Z","conversation_id":"ed68003c-8cc5-4f22-8f50-53475a08cef0"},"parent_id":"13d3ecbb-507b-41ba-988a-ce67a30e480f","version":{"api":"v2","date":"2024-03-08"}}]}' headers: Connection: - keep-alive Date: - - Thu, 07 Mar 2024 20:37:05 GMT + - Fri, 08 Mar 2024 10:11:20 GMT Keep-Alive: - timeout=72 Transfer-Encoding: @@ -148,7 +148,7 @@ interactions: content-type: - application/json; charset=utf-8 content-version: - - '2024-03-07' + - '2024-03-08' vary: - accept-encoding x-ratelimit-limit: