Skip to content

Commit

Permalink
fix: after parsing the paths, replace the image paths with file ids (#…
Browse files Browse the repository at this point in the history
…3847)

* fix: after parsing the paths, replace the image paths with file ids

* fix for link too
  • Loading branch information
abvthecity authored Jun 13, 2024
1 parent 0656252 commit c2ea80d
Show file tree
Hide file tree
Showing 3 changed files with 199 additions and 63 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -632,9 +632,9 @@ description: >-
exports[`hume should replace all images with full path 1`] = `
[
"/Volume/git/fern/my/docs/img/evi-tools-view.png",
"/Volume/git/fern/my/docs/img/create-function-interface.png",
"/Volume/git/fern/my/docs/img/add-tool-view.png",
"/Volume/git/fern/my/docs/folder/img/add-tool-view.png",
"/Volume/git/fern/my/docs/folder/img/evi-tools-view.png",
"/Volume/git/fern/my/docs/folder/img/create-function-interface.png",
]
`;
Expand All @@ -644,42 +644,83 @@ exports[`hume should replace all images with full path 2`] = `
"added": undefined,
"count": 1,
"removed": true,
"value": " <img src="../img/evi-tools-view.png" alt="EVI Tools page" />
"value": " ![image](./img/add-tool-view.png)
",
},
{
"added": true,
"count": 1,
"removed": undefined,
"value": " <img src="/Volume/git/fern/my/docs/img/evi-tools-view.png" alt="EVI Tools page" />
"value": " ![image](/Volume/git/fern/my/docs/folder/img/add-tool-view.png)
",
},
{
"added": undefined,
"count": 1,
"removed": true,
"value": " <img src="../img/create-function-interface.png" alt="EVI Create function interface" />
"value": " ![test](./img/add-tool-view.png)
",
},
{
"added": true,
"count": 1,
"removed": undefined,
"value": " <img src="/Volume/git/fern/my/docs/img/create-function-interface.png" alt="EVI Create function interface" />
"value": " ![test](/Volume/git/fern/my/docs/folder/img/add-tool-view.png)
",
},
{
"added": undefined,
"count": 1,
"removed": true,
"value": " <img src="../img/add-tool-view.png" alt="Add tool to configuration within the Hume portal"/>
"value": " <img src="./img/evi-tools-view.png" alt="EVI Tools page" />
",
},
{
"added": true,
"count": 1,
"removed": undefined,
"value": " <img src="/Volume/git/fern/my/docs/img/add-tool-view.png" alt="Add tool to configuration within the Hume portal"/>
"value": " <img src="/Volume/git/fern/my/docs/folder/img/evi-tools-view.png" alt="EVI Tools page" />
",
},
{
"added": undefined,
"count": 1,
"removed": true,
"value": " <img src="./img/create-function-interface.png" alt="EVI Create function interface" />
",
},
{
"added": true,
"count": 1,
"removed": undefined,
"value": " <img src="/Volume/git/fern/my/docs/folder/img/create-function-interface.png" alt="EVI Create function interface" />
",
},
{
"added": undefined,
"count": 1,
"removed": true,
"value": " <img src="./img/add-tool-view.png" alt="Add tool to configuration within the Hume portal"/>
",
},
{
"added": true,
"count": 1,
"removed": undefined,
"value": " <img src="/Volume/git/fern/my/docs/folder/img/add-tool-view.png" alt="Add tool to configuration within the Hume portal"/>
",
},
{
"added": undefined,
"count": 1,
"removed": true,
"value": "---",
},
{
"added": true,
"count": 1,
"removed": undefined,
"value": "---
",
},
]
Expand All @@ -691,42 +732,83 @@ exports[`hume should replace all images with full path 3`] = `
"added": undefined,
"count": 1,
"removed": true,
"value": " <img src="../img/evi-tools-view.png" alt="EVI Tools page" />
"value": " ![image](./img/add-tool-view.png)
",
},
{
"added": true,
"count": 1,
"removed": undefined,
"value": " <img src="/Volume/git/fern/my/docs/img/evi-tools-view.png" alt="EVI Tools page" />
"value": " ![image](file:123e4567-e89b-12d3-a456-426655440000)
",
},
{
"added": undefined,
"count": 1,
"removed": true,
"value": " <img src="../img/create-function-interface.png" alt="EVI Create function interface" />
"value": " ![test](./img/add-tool-view.png)
",
},
{
"added": true,
"count": 1,
"removed": undefined,
"value": " <img src="/Volume/git/fern/my/docs/img/create-function-interface.png" alt="EVI Create function interface" />
"value": " ![test](file:123e4567-e89b-12d3-a456-426655440000)
",
},
{
"added": undefined,
"count": 1,
"removed": true,
"value": " <img src="../img/add-tool-view.png" alt="Add tool to configuration within the Hume portal"/>
"value": " <img src="./img/evi-tools-view.png" alt="EVI Tools page" />
",
},
{
"added": true,
"count": 1,
"removed": undefined,
"value": " <img src="/Volume/git/fern/my/docs/img/add-tool-view.png" alt="Add tool to configuration within the Hume portal"/>
"value": " <img src="file:123e4567-e89b-12d3-a456-426655440000" alt="EVI Tools page" />
",
},
{
"added": undefined,
"count": 1,
"removed": true,
"value": " <img src="./img/create-function-interface.png" alt="EVI Create function interface" />
",
},
{
"added": true,
"count": 1,
"removed": undefined,
"value": " <img src="file:123e4567-e89b-12d3-a456-426655440000" alt="EVI Create function interface" />
",
},
{
"added": undefined,
"count": 1,
"removed": true,
"value": " <img src="./img/add-tool-view.png" alt="Add tool to configuration within the Hume portal"/>
",
},
{
"added": true,
"count": 1,
"removed": undefined,
"value": " <img src="file:123e4567-e89b-12d3-a456-426655440000" alt="Add tool to configuration within the Hume portal"/>
",
},
{
"added": undefined,
"count": 1,
"removed": true,
"value": "---",
},
{
"added": true,
"count": 1,
"removed": undefined,
"value": "---
",
},
]
Expand Down
27 changes: 23 additions & 4 deletions packages/cli/docs-resolver/src/__test__/fixtures/hume.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,25 @@ step-by-step instructions on how to create and use an EVI Configuration.

For EVI to leverage tools or call functions, a configuration must be created with the tool’s definition. Our step-by-step guide below walks you through creating a tool and adding it to a configuration, either via our [Portal](https://beta.hume.ai) or a POST request.

<Tabs>
<Tab>
<Frame>
![image](./img/add-tool-view.png)
</Frame>
</Tab>
</Tabs>

<Tabs>
<Tab title="tab 1">
<Frame>
![test](./img/add-tool-view.png)
</Frame>
</Tab>
<Tab title="tab 2">
text and image
</Tab>
</Tabs>

<Tabs>
<Tab title='Portal'>
<Steps>
Expand All @@ -42,7 +61,7 @@ For EVI to leverage tools or call functions, a configuration must be created wit
We will first create a Tool with a specified function. In this case, we will create a tool for getting the weather. In the Portal, navigate to the [EVI Tools page](https://beta.hume.ai/evi/tools). Click the **Create function** button to begin.

<Frame>
<img src="../img/evi-tools-view.png" alt="EVI Tools page" />
<img src="./img/evi-tools-view.png" alt="EVI Tools page" />
</Frame>

### Fill in the Tool details.
Expand All @@ -53,7 +72,7 @@ For EVI to leverage tools or call functions, a configuration must be created wit
- **Parameters**: Define the parameters your function accepts using a JSON schema. This schema specifies the expected structure and data types of the input parameters.

<Frame>
<img src="../img/create-function-interface.png" alt="EVI Create function interface" />
<img src="./img/create-function-interface.png" alt="EVI Create function interface" />
</Frame>

The JSON schema defines the structure of the parameters your function will accept. The key components of the schema are:
Expand Down Expand Up @@ -86,7 +105,7 @@ For EVI to leverage tools or call functions, a configuration must be created wit
After creating an EVI Configuration using our [Configuration guide](https://dev.hume.ai/docs/empathic-voice-interface-evi/configuration), navgiate to the specific configuration where you want to add your tool. In the **Tools** section, click the **Add** button to add a tool to your configuration.

<Frame>
<img src="../img/add-tool-view.png" alt="Add tool to configuration within the Hume portal"/>
<img src="./img/add-tool-view.png" alt="Add tool to configuration within the Hume portal"/>
</Frame>

</Steps>
Expand Down Expand Up @@ -634,4 +653,4 @@ for this type of failure:
```
</CodeBlock>

---
---
Loading

0 comments on commit c2ea80d

Please sign in to comment.