Skip to content

Commit 775884b

Browse files
🌿 Fern Regeneration -- July 31, 2024 (#6)
1 parent 56064d2 commit 775884b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+564
-500
lines changed

.fernignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# Specify files that shouldn't be modified by Fern
22

3-
.github/workflows/ci.yml
3+
tests/test_evaluators.py
4+
tests/test_prompts.py
5+
tests/utilities.py

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Install Fern
3737
run: npm install -g fern-api
3838
- name: Test
39-
run: fern test --command "poetry run pytest -rP tests/custom"
39+
run: fern test --command "poetry run pytest -rP ."
4040

4141
publish:
4242
needs: [compile, test]

.mock/definition/__package__.yml

Lines changed: 89 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ types:
3131
tools:
3232
type: optional<list<ToolConfigRequest>>
3333
docs: Tools associated with the agent.
34-
model_config:
35-
type: ModelConfigRequest
36-
docs: Model config associated with the agent.
3734
BaseMetricResponse:
3835
properties:
3936
id:
@@ -337,6 +334,9 @@ types:
337334
id:
338335
type: string
339336
docs: Unique identifier for the Dataset. Starts with `ds_`.
337+
directory_id:
338+
type: optional<string>
339+
docs: ID of the directory that the file is in on Humanloop.
340340
name:
341341
type: string
342342
docs: Name of the Dataset, which is used as a unique identifier.
@@ -578,9 +578,6 @@ types:
578578
evaluator_type:
579579
type: string
580580
docs: Type of evaluator.
581-
model_config:
582-
type: optional<ModelConfigResponse>
583-
docs: The model config defining the LLM evaluator.
584581
code:
585582
type: optional<string>
586583
docs: >-
@@ -593,11 +590,8 @@ types:
593590
type: optional<EvaluatorReturnTypeEnum>
594591
docs: The type of the return value of the evaluator.
595592
EvaluatorLogResponse:
596-
docs: Submit Evaluator judgment for another File's Log.
593+
docs: General request for creating a Log
597594
properties:
598-
id:
599-
type: string
600-
docs: Unique identifier for the Log.
601595
output:
602596
type: optional<string>
603597
docs: >-
@@ -627,11 +621,10 @@ types:
627621
internal systems) by passing the same `session_id` in subsequent log
628622
requests.
629623
parent_id:
630-
type: optional<string>
624+
type: string
631625
docs: >-
632-
Unique identifier for the parent Log in a Session. Should only be
633-
provided if `session_id` is provided. If provided, the Log will be
634-
nested under the parent Log within the Session.
626+
Identifier of the evaluated Log. The newly created Log will have this
627+
one set as parent.
635628
inputs:
636629
type: optional<map<string, unknown>>
637630
docs: The inputs passed to the prompt template.
@@ -664,6 +657,9 @@ types:
664657
type: optional<string>
665658
docs: The name of the Environment the Log is associated to.
666659
judgment: optional<unknown>
660+
id:
661+
type: string
662+
docs: Unique identifier for the Log.
667663
evaluator:
668664
type: EvaluatorResponse
669665
docs: The Evaluator used to generate the judgment.
@@ -685,6 +681,13 @@ types:
685681
id:
686682
type: string
687683
docs: Unique identifier for the Evaluator.
684+
directory_id:
685+
type: optional<string>
686+
docs: ID of the directory that the file is in on Humanloop.
687+
commit_message:
688+
type: optional<string>
689+
docs: Message describing the changes made.
690+
spec: EvaluatorResponseSpec
688691
name:
689692
type: string
690693
docs: Name of the Evaluator, which is used as a unique identifier.
@@ -704,10 +707,6 @@ types:
704707
docs: The user who created the Prompt.
705708
status: VersionStatus
706709
last_used_at: datetime
707-
commit_message:
708-
type: optional<string>
709-
docs: Message describing the changes made.
710-
spec: EvaluatorResponseSpec
711710
version_logs_count:
712711
type: integer
713712
docs: The number of logs that have been generated for this Prompt Version
@@ -1789,11 +1788,8 @@ types:
17891788
- literal<"required">
17901789
- ToolChoice
17911790
PromptLogResponse:
1792-
docs: Request for creating a Prompt log.
1791+
docs: General request for creating a Log
17931792
properties:
1794-
id:
1795-
type: string
1796-
docs: Unique identifier for the Log.
17971793
output_message:
17981794
type: optional<ChatMessage>
17991795
docs: The message returned by the provider.
@@ -1902,6 +1898,9 @@ types:
19021898
environment:
19031899
type: optional<string>
19041900
docs: The name of the Environment the Log is associated to.
1901+
id:
1902+
type: string
1903+
docs: Unique identifier for the Log.
19051904
PromptResponseTemplate:
19061905
discriminated: false
19071906
docs: >-
@@ -1920,7 +1919,15 @@ types:
19201919
- string
19211920
- list<string>
19221921
PromptResponse:
1923-
docs: Request model for creating a new Prompt
1922+
docs: >-
1923+
Base type that all File Responses should inherit from.
1924+
1925+
1926+
Attributes defined here are common to all File Responses and should be
1927+
overridden
1928+
1929+
in the inheriting classes with documentation and appropriate Field
1930+
definitions.
19241931
properties:
19251932
path:
19261933
type: string
@@ -1930,27 +1937,9 @@ types:
19301937
id:
19311938
type: string
19321939
docs: Unique identifier for the Prompt.
1933-
name:
1934-
type: string
1935-
docs: Name of the Prompt.
1936-
version_id:
1937-
type: string
1938-
docs: >-
1939-
Unique identifier for the specific Prompt Version. If no query params
1940-
provided, the default deployed Prompt Version is returned.
1941-
type: optional<literal<"prompt">>
1942-
environments:
1943-
type: optional<list<EnvironmentResponse>>
1944-
docs: The list of environments the Prompt Version is deployed to.
1945-
created_at: datetime
1946-
updated_at: datetime
1947-
created_by:
1948-
type: optional<UserResponse>
1949-
docs: The user who created the Prompt.
1950-
status:
1951-
type: VersionStatus
1952-
docs: The status of the Prompt Version.
1953-
last_used_at: datetime
1940+
directory_id:
1941+
type: optional<string>
1942+
docs: ID of the directory that the file is in on Humanloop.
19541943
model:
19551944
type: string
19561945
docs: >-
@@ -2029,6 +2018,27 @@ types:
20292018
commit_message:
20302019
type: optional<string>
20312020
docs: Message describing the changes made.
2021+
name:
2022+
type: string
2023+
docs: Name of the Prompt.
2024+
version_id:
2025+
type: string
2026+
docs: >-
2027+
Unique identifier for the specific Prompt Version. If no query params
2028+
provided, the default deployed Prompt Version is returned.
2029+
type: optional<literal<"prompt">>
2030+
environments:
2031+
type: optional<list<EnvironmentResponse>>
2032+
docs: The list of environments the Prompt Version is deployed to.
2033+
created_at: datetime
2034+
updated_at: datetime
2035+
created_by:
2036+
type: optional<UserResponse>
2037+
docs: The user who created the Prompt.
2038+
status:
2039+
type: VersionStatus
2040+
docs: The status of the Prompt Version.
2041+
last_used_at: datetime
20322042
version_logs_count:
20332043
type: integer
20342044
docs: The number of logs that have been generated for this Prompt Version
@@ -2213,11 +2223,8 @@ types:
22132223
Values needed to setup the Tool, defined in JSON Schema format:
22142224
https://json-schema.org/
22152225
ToolLogResponse:
2216-
docs: Request for creating a Tool log.
2226+
docs: General request for creating a Log
22172227
properties:
2218-
id:
2219-
type: string
2220-
docs: Unique identifier for the Log.
22212228
output:
22222229
type: optional<string>
22232230
docs: >-
@@ -2283,6 +2290,9 @@ types:
22832290
environment:
22842291
type: optional<string>
22852292
docs: The name of the Environment the Log is associated to.
2293+
id:
2294+
type: string
2295+
docs: Unique identifier for the Log.
22862296
tool:
22872297
type: ToolResponse
22882298
docs: Tool details used to generate the Log.
@@ -2626,7 +2636,15 @@ types:
26262636
- ToolLogResponse
26272637
- EvaluatorLogResponse
26282638
ToolResponse:
2629-
docs: Request to create a new Tool.
2639+
docs: >-
2640+
Base type that all File Responses should inherit from.
2641+
2642+
2643+
Attributes defined here are common to all File Responses and should be
2644+
overridden
2645+
2646+
in the inheriting classes with documentation and appropriate Field
2647+
definitions.
26302648
properties:
26312649
path:
26322650
type: string
@@ -2636,6 +2654,28 @@ types:
26362654
id:
26372655
type: string
26382656
docs: Unique identifier for the Tool.
2657+
directory_id:
2658+
type: optional<string>
2659+
docs: ID of the directory that the file is in on Humanloop.
2660+
function:
2661+
type: optional<ToolFunction>
2662+
docs: >-
2663+
Callable function specification of the Tool shown to the model for
2664+
tool calling.
2665+
source_code:
2666+
type: optional<string>
2667+
docs: Code source of the Tool.
2668+
setup_values:
2669+
type: optional<map<string, unknown>>
2670+
docs: >-
2671+
Values needed to setup the Tool, defined in JSON Schema format:
2672+
https://json-schema.org/
2673+
tool_type:
2674+
type: optional<FilesToolType>
2675+
docs: Type of Tool.
2676+
commit_message:
2677+
type: optional<string>
2678+
docs: Message describing the changes made.
26392679
name:
26402680
type: string
26412681
docs: Name of the Tool, which is used as a unique identifier.
@@ -2657,25 +2697,6 @@ types:
26572697
type: VersionStatus
26582698
docs: The status of the Tool Version.
26592699
last_used_at: datetime
2660-
function:
2661-
type: optional<ToolFunction>
2662-
docs: >-
2663-
Callable function specification of the Tool shown to the model for
2664-
tool calling.
2665-
source_code:
2666-
type: optional<string>
2667-
docs: Code source of the Tool.
2668-
setup_values:
2669-
type: optional<map<string, unknown>>
2670-
docs: >-
2671-
Values needed to setup the Tool, defined in JSON Schema format:
2672-
https://json-schema.org/
2673-
tool_type:
2674-
type: optional<FilesToolType>
2675-
docs: Type of Tool.
2676-
commit_message:
2677-
type: optional<string>
2678-
docs: Message describing the changes made.
26792700
version_logs_count:
26802701
type: integer
26812702
docs: The number of logs that have been generated for this Tool Version

.mock/definition/api.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ error-discrimination:
33
strategy: status-code
44
display-name: Humanloop API
55
environments:
6-
Default: https://neostaging.humanloop.ml/v5
6+
Default: https://api.humanloop.com/v5
77
default-environment: Default
88
auth-schemes:
99
APIKeyHeader:

.mock/definition/datasets.yml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,12 @@ service:
130130
path:
131131
type: optional<string>
132132
docs: >-
133-
Path of the Dataset, including the name, which is used as a
134-
unique identifier.
133+
Path of the Dataset, including the name. This locates the
134+
Dataset in the Humanloop filesystem and is used as as a unique
135+
identifier. Example: `folder/name` or just `name`.
135136
id:
136137
type: optional<string>
137-
docs: ID for an existing Dataset to update.
138+
docs: ID for an existing Dataset.
138139
datapoints:
139140
docs: >-
140141
The Datapoints to create this Dataset version with. Modify the
@@ -354,6 +355,7 @@ service:
354355
body:
355356
path: path
356357
id: id
358+
directory_id: directory_id
357359
name: name
358360
version_id: version_id
359361
type: dataset
@@ -590,6 +592,7 @@ service:
590592
body:
591593
path: path
592594
id: id
595+
directory_id: directory_id
593596
name: name
594597
version_id: version_id
595598
type: dataset
@@ -717,21 +720,7 @@ service:
717720
file:
718721
path: path
719722
id: id
720-
name: name
721-
version_id: version_id
722-
type: prompt
723-
environments:
724-
- id: id
725-
created_at: '2024-01-15T09:30:00Z'
726-
name: name
727-
tag: default
728-
created_at: '2024-01-15T09:30:00Z'
729-
updated_at: '2024-01-15T09:30:00Z'
730-
created_by:
731-
id: id
732-
email_address: email_address
733-
status: uncommitted
734-
last_used_at: '2024-01-15T09:30:00Z'
723+
directory_id: directory_id
735724
model: model
736725
endpoint: complete
737726
template: template
@@ -756,6 +745,21 @@ service:
756745
id: id
757746
version_id: version_id
758747
commit_message: commit_message
748+
name: name
749+
version_id: version_id
750+
type: prompt
751+
environments:
752+
- id: id
753+
created_at: '2024-01-15T09:30:00Z'
754+
name: name
755+
tag: default
756+
created_at: '2024-01-15T09:30:00Z'
757+
updated_at: '2024-01-15T09:30:00Z'
758+
created_by:
759+
id: id
760+
email_address: email_address
761+
status: uncommitted
762+
last_used_at: '2024-01-15T09:30:00Z'
759763
version_logs_count: 1
760764
total_logs_count: 1
761765
inputs:

0 commit comments

Comments
 (0)