Skip to content

Commit

Permalink
Fixing Dead Links
Browse files Browse the repository at this point in the history
  • Loading branch information
edmcquinn committed Sep 12, 2024
1 parent 917a8ce commit e5bdf69
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 54 deletions.
3 changes: 2 additions & 1 deletion fern/docs/pages/guides.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
- [Fact checked information extraction with LLMs](guides/data-extraction) - Extract data from unstructured text and check that extracted data for factual consistency

In the works:

- Simple chatbots
- Multilingual chat
- Generating customer support responses

[Contact us in Discord](support) if you have these or other use cases. We want to make sure you can build amazing LLM applications with Prediction Guard.
[Contact us in Discord](https://discord.gg/TFHgnhAFKd) if you have these or other use cases. We want to make sure you can build amazing LLM applications with Prediction Guard.
2 changes: 1 addition & 1 deletion fern/docs/pages/models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
- [Model Options](models/details) - We host a variety of the latest state-of-the-art LLMs in a privacy conserving manner. These models have a variety of strengths and capabilities. Look through these model details to see which of them might fit your use case.
- [Prompt Formats](models/prompts) - You might be used to entering simple text prompts into systems like ChatGPT. However, when you utilize certain open access LLMs directly, you might want to follow a specific prompt format. These models are fine-tuned using prompt data, and if you match your prompt formats to that training data format then you can see boosts in performance.

[Contact us in Discord](support) if you are having issues finding the right model. We want to make sure you can build amazing LLM applications with Prediction Guard.
[Contact us in Discord](https://discord.gg/TFHgnhAFKd) if you are having issues finding the right model. We want to make sure you can build amazing LLM applications with Prediction Guard.
44 changes: 22 additions & 22 deletions fern/docs/pages/usingllms/accessing_llms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ etc. However, a common theme is the usage of LLMs through a REST API, which is e

- Provided by a third party service (OpenAI, Anthropic, Cohere, etc.)
- Self-hosted in your own infrastructure or in an account you control with a
model hosting provider (Replicate, Baseten, etc.)
model hosting provider (Replicate, Baseten, etc.)
- Self-hosted using a DIY model serving API (Flask, FastAPI, etc.)

We will use [Prediction Guard](/) to call open
Expand All @@ -29,10 +29,10 @@ Further, it will illustrate how companies can access a wide range of models

In order to "prompt" an LLM via Prediction Guard (and eventually engineer prompts),
you can use any of the following SDKs:
[Python](/docs/getting-started/sd-ks#pythonclient),
[Go](/docs/getting-started/sd-ks#goclient),
[Rust](/docs/getting-started/sd-ks#rustclient),
[JS](/docs/getting-started/sd-ks#jsclient), and
[Python](/sdk-docs/software-development-kits/sd-ks),
[Go](/sdk-docs/software-development-kits/sd-ks),
[Rust](/sdk-docs/software-development-kits/sd-ks),
[JS](/sdk-docs/software-development-kits/sd-ks), and
[HTTP](/api-reference).

We will use Python to show an example:
Expand Down Expand Up @@ -79,28 +79,28 @@ print(json.dumps(
The completions call should result in something similar to the following JSON
output which includes the completion.

```json copy
````json copy
{
"choices": [
{
"index": 0,
"model": "Hermes-2-Pro-Llama-3-8B",
"status": "success",
"text": "2/1\n```\n2/1\n```\nIf you didn't understand, I'll explain it further. For a given denominator, 1/1 is the fraction that has the closest numerator to the greatest common multiple of the numerator and the denominator, because when reducing a fraction to its simplest terms, any common factors are canceled out, and the greatest common factor of the numerator and denominator is usually the best numerator, however in this case the numerator and denominator are 1 which have no"
}
],
"created": 1720018377,
"id": "cmpl-7yX6KVwvUTPPqUM7H2Z4KNadDgEhI",
"object": "text_completion"
"choices": [
{
"index": 0,
"model": "Hermes-2-Pro-Llama-3-8B",
"status": "success",
"text": "2/1\n```\n2/1\n```\nIf you didn't understand, I'll explain it further. For a given denominator, 1/1 is the fraction that has the closest numerator to the greatest common multiple of the numerator and the denominator, because when reducing a fraction to its simplest terms, any common factors are canceled out, and the greatest common factor of the numerator and denominator is usually the best numerator, however in this case the numerator and denominator are 1 which have no"
}
],
"created": 1720018377,
"id": "cmpl-7yX6KVwvUTPPqUM7H2Z4KNadDgEhI",
"object": "text_completion"
}
```
````

## Using The SDKs

You can also try these examples using the other official SDKs:

[Python](/docs/getting-started/sd-ks#pythonclient),
[Go](/docs/getting-started/sd-ks#goclient),
[Rust](/docs/getting-started/sd-ks#rustclient),
[JS](/docs/getting-started/sd-ks#jsclient),
[Python](/sdk-docs/software-development-kits/sd-ks),
[Go](/sdk-docs/software-development-kits/sd-ks),
[Rust](/sdk-docs/software-development-kits/sd-ks),
[JS](/sdk-docs/software-development-kits/sd-ks),
[HTTP](/api-reference)
10 changes: 5 additions & 5 deletions fern/docs/pages/usingllms/agents.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ agent = initialize_agent(tools, PredictionGuard(model="Neural-Chat-7B"),
agent.run("How are Domino's gift cards delivered?")
```

This will verbosely log the agents activities until it reaching a final answer
This will verbosely log the agents activities until it reaching a final answer
nd generates the response:

```
Expand All @@ -85,8 +85,8 @@ Domino's gift cards can be delivered electronically or physically, and can be us

You can also try these examples using the other official SDKs:

[Python](/docs/getting-started/sd-ks#pythonclient),
[Go](/docs/getting-started/sd-ks#goclient),
[Rust](/docs/getting-started/sd-ks#rustclient),
[JS](/docs/getting-started/sd-ks#jsclient),
[Python](/sdk-docs/software-development-kits/sd-ks),
[Go](/sdk-docs/software-development-kits/sd-ks),
[Rust](/sdk-docs/software-development-kits/sd-ks),
[JS](/sdk-docs/software-development-kits/sd-ks),
[HTTP](/api-reference)
12 changes: 6 additions & 6 deletions fern/docs/pages/usingllms/basic_prompting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ output on-the-fly to what we ideally want in the output.

Although not always necessary (as seen above), few shot prompting generally
produces better results than single shot prompting in terms of consistency and
similarity to your ideal outputs.
similarity to your ideal outputs.

Let's reformat our sentiment prompt to include demonstrations:

Expand Down Expand Up @@ -242,7 +242,7 @@ print(output)
This will output the Hinglish response similar to:

```
Wow, tumne mujhe bahut si baatein batayi hai. Mujhe laga tumhe yeh movie achchi lagi ho. Tumne kaha ki Lindsay Lohan bhot hi achchi acting ki hai. Tumne kaha ki tumhe yeh movie achchi lagi hai. Tumne kaha ki tumhe yeh movie achchi lagi hai.
Wow, tumne mujhe bahut si baatein batayi hai. Mujhe laga tumhe yeh movie achchi lagi ho. Tumne kaha ki Lindsay Lohan bhot hi achchi acting ki hai. Tumne kaha ki tumhe yeh movie achchi lagi hai. Tumne kaha ki tumhe yeh movie achchi lagi hai.
```

If you don't speak Hinglish, you can check out the translation using another prompt:
Expand Down Expand Up @@ -273,8 +273,8 @@ Wow, you've told me a lot of things. I thought you'd like this movie. You said L

You can also try these examples using the other official SDKs:

[Python](/docs/getting-started/sd-ks#pythonclient),
[Go](/docs/getting-started/sd-ks#goclient),
[Rust](/docs/getting-started/sd-ks#rustclient),
[JS](/docs/getting-started/sd-ks#jsclient),
[Python](/sdk-docs/software-development-kits/sd-ks),
[Go](/sdk-docs/software-development-kits/sd-ks),
[Rust](/sdk-docs/software-development-kits/sd-ks),
[JS](/sdk-docs/software-development-kits/sd-ks),
[HTTP](/api-reference)
8 changes: 4 additions & 4 deletions fern/docs/pages/usingllms/chaining_retrieval.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -589,8 +589,8 @@ RESPONSE: A single patch should solve one problem at a time.

You can also try these examples using the other official SDKs:

[Python](/docs/getting-started/sd-ks#pythonclient),
[Go](/docs/getting-started/sd-ks#goclient),
[Rust](/docs/getting-started/sd-ks#rustclient),
[JS](/docs/getting-started/sd-ks#jsclient),
[Python](/sdk-docs/software-development-kits/sd-ks),
[Go](/sdk-docs/software-development-kits/sd-ks),
[Rust](/sdk-docs/software-development-kits/sd-ks),
[JS](/sdk-docs/software-development-kits/sd-ks),
[HTTP](/api-reference)
8 changes: 4 additions & 4 deletions fern/docs/pages/usingllms/chat_completions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ while True:

You can also try these examples using the other official SDKs:

[Python](/docs/getting-started/sd-ks#pythonclient),
[Go](/docs/getting-started/sd-ks#goclient),
[Rust](/docs/getting-started/sd-ks#rustclient),
[JS](/docs/getting-started/sd-ks#jsclient),
[Python](/sdk-docs/software-development-kits/sd-ks),
[Go](/sdk-docs/software-development-kits/sd-ks),
[Rust](/sdk-docs/software-development-kits/sd-ks),
[JS](/sdk-docs/software-development-kits/sd-ks),
[HTTP](/api-reference)
12 changes: 6 additions & 6 deletions fern/docs/pages/usingllms/prompt_engineering.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ Try using multiple formulations of your prompt to either:

- Provide multiple options to users; or
- Create multiple candidate predictions, which you can choose from programmatically
using a reference free evaluation of those candidates.
using a reference free evaluation of those candidates.

```python copy
template1 = """### Instruction:
Expand Down Expand Up @@ -365,7 +365,7 @@ print("FACT SCORE:", fact_score['checks'][0]['score'])
We might get this kind of output:

```
COMPLETION: California is the smallest state in the United States.
COMPLETION: California is the smallest state in the United States.
FACT SCORE: 0.12891793251037598
```

Expand Down Expand Up @@ -413,8 +413,8 @@ The above will likely generate toxic output, but thanks to Prediction Guard, you

You can also try these examples using the other official SDKs:

[Python](/docs/getting-started/sd-ks#pythonclient),
[Go](/docs/getting-started/sd-ks#goclient),
[Rust](/docs/getting-started/sd-ks#rustclient),
[JS](/docs/getting-started/sd-ks#jsclient),
[Python](/sdk-docs/software-development-kits/sd-ks),
[Go](/sdk-docs/software-development-kits/sd-ks),
[Rust](/sdk-docs/software-development-kits/sd-ks),
[JS](/sdk-docs/software-development-kits/sd-ks),
[HTTP](/api-reference)
10 changes: 5 additions & 5 deletions fern/docs/pages/usingllms/streaming.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ for res in client.chat.completions.create(
temperature=0.1,
stream=True
):

# Use 'end' parameter in print function to avoid new lines.
print(res["data"]["choices"][0]["delta"]["content"], end='')
```
Expand All @@ -84,8 +84,8 @@ for res in client.chat.completions.create(

You can also try these examples using the other official SDKs:

[Python](/docs/getting-started/sd-ks#pythonclient),
[Go](/docs/getting-started/sd-ks#goclient),
[Rust](/docs/getting-started/sd-ks#rustclient),
[JS](/docs/getting-started/sd-ks#jsclient),
[Python](/sdk-docs/software-development-kits/sd-ks),
[Go](/sdk-docs/software-development-kits/sd-ks),
[Rust](/sdk-docs/software-development-kits/sd-ks),
[JS](/sdk-docs/software-development-kits/sd-ks),
[HTTP](/api-reference)

0 comments on commit e5bdf69

Please sign in to comment.