-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rawResponse -> raw_response for snake_case consistency (#657)
# rawResponse -> raw_response for snake_case consistency Just updating the `rawResponse` property name to `raw_response` for snake_case consistency in the schema. All other changes here are just auto-formatted ## Testing `pytest` ``` =========================================================== 88 passed, 38 warnings in 3.28s =========================================================== ``` `yarn test` ``` (aiconfig) ryanholinshead@Ryans-MBP typescript % yarn test yarn run v1.22.19 $ jest --runInBand PASS __tests__/parsers/hf/hf.test.ts HuggingFaceTextGeneration ModelParser ✓ uses HuggingFace API token from environment variable if it exists (9 ms) ✓ serializing params to config prompt (1 ms) ✓ serialize callbacks (1 ms) ✓ deserializing config prompt to params (1 ms) ✓ deserialize callbacks (1 ms) ✓ run prompt, non-streaming (4 ms) ✓ run prompt, streaming (2 ms) ✓ run callbacks (1 ms) PASS __tests__/config.test.ts Loading an AIConfig ✓ loading a basic chatgpt query config (6 ms) ✓ loading a prompt chain (4 ms) ✓ deserialize and re-serialize a prompt chain (2 ms) ✓ serialize a prompt chain with different settings (1 ms) PASS __tests__/parsers/palm-text/palm.test.ts PaLM Text ModelParser ✓ serializing params to config prompt (4 ms) ✓ deserializing params to config (2 ms) ✓ run prompt, non-streaming (87 ms) PASS __tests__/testProgramaticallyCreateConfig.ts test Get Global Settings ✓ Retrieving global setting from AIConfig with 1 model (1 ms) ExtractOverrideSettings function ✓ Should return initial settings when no global settings are defined ✓ Should return an override when initial settings differ from global settings (1 ms) ✓ Should return empty override when global settings match initial settings ✓ Should return empty override when Global settings defined and initial settings are empty PASS __tests__/testSave.ts AIConfigRuntime save() ✓ saves the config and checks if the config json doesn't have key filePath (4 ms) Test Suites: 5 passed, 5 total Tests: 21 passed, 21 total Snapshots: 0 total Time: 2.303 s Ran all test suites. ✨ Done in 3.58s. ``` Ran `npx ts-node function-call-stream.ts` and confirmed correct output metadata with raw_response, e.g.: ``` "outputs": [ { "output_type": "execute_result", "data": { "kind": "tool_calls", "value": [ { "type": "function", "function": { "name": "list", "arguments": "{\n\"genre\": \"historical\"\n}" } } ] }, "execution_count": 0, "metadata": { "finish_reason": "function_call", "raw_response": { "role": "assistant", "content": null, "function_call": { "name": "list", "arguments": "{\n\"genre\": \"historical\"\n}" } } } } ] ```
- Loading branch information
Showing
11 changed files
with
148 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.