Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
---
schema:
type: "SoftwareSourceCode"
name: "any-llm"
description: "A Python library providing a single interface to different LLM providers including OpenAI, Anthropic, Mistral, and more"
programmingLanguage: "Python"
codeRepository: "https://github.com/mozilla-ai/any-llm"
license: "https://github.com/mozilla-ai/any-llm/blob/main/LICENSE"
---

<p align="center">
<picture>
<img src="./images/any-llm-logo.png" width="20%" alt="any-llm logo"/>
</picture>
<p align="center"> <b>Stop rewriting code for every LLM provider </b></p>
<p align="center"> <b>One interface. Every LLM. </b></p>
</p>

`any-llm` is a Python library providing a single interface to different llm providers.
Expand Down
108 changes: 108 additions & 0 deletions docs/overrides/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{% extends "base.html" %}

{% block extrahead %}
{{ super() }}

{% if page and page.meta and page.meta.schema %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "{{ page.meta.schema.type }}",
{% if page.meta.schema.name %}
"name": "{{ page.meta.schema.name }}",
{% endif %}
{% if page.meta.schema.description %}
"description": "{{ page.meta.schema.description }}",
{% endif %}

{# Software-specific fields #}
{% if page.meta.schema.type == "SoftwareSourceCode" %}
{% if page.meta.schema.programmingLanguage %}
"programmingLanguage": "{{ page.meta.schema.programmingLanguage }}",
{% endif %}
{% if page.meta.schema.codeRepository %}
"codeRepository": "{{ page.meta.schema.codeRepository }}",
{% endif %}
{% if page.meta.schema.license %}
"license": "{{ page.meta.schema.license }}",
{% endif %}
{% endif %}

{# HowTo-specific fields #}
{% if page.meta.schema.type == "HowTo" %}
{% if page.meta.schema.totalTime %}
"totalTime": "{{ page.meta.schema.totalTime }}",
{% endif %}
{% if page.meta.schema.tool %}
"tool": [
{% for tool in page.meta.schema.tool %}
{
"@type": "HowToTool",
"name": "{{ tool }}"
}{% if not loop.last %},{% endif %}
{% endfor %}
],
{% endif %}
{% if page.meta.schema.supply %}
"supply": [
{% for supply in page.meta.schema.supply %}
{
"@type": "HowToSupply",
"name": "{{ supply }}"
}{% if not loop.last %},{% endif %}
{% endfor %}
],
{% endif %}
{% if page.meta.schema.steps %}
"step": [
{% for step in page.meta.schema.steps %}
{
"@type": "HowToStep",
"name": "{{ step.name }}",
"text": "{{ step.text }}"
{% if step.url %}
,"url": "{{ step.url }}"
{% endif %}
}{% if not loop.last %},{% endif %}
{% endfor %}
],
{% endif %}
{% endif %}

{# TechArticle-specific fields #}
{% if page.meta.schema.type == "TechArticle" %}
{% if page.meta.schema.datePublished %}
"datePublished": "{{ page.meta.schema.datePublished }}",
{% endif %}
{% if page.meta.schema.dateModified %}
"dateModified": "{{ page.meta.schema.dateModified }}",
{% endif %}
{% if page.canonical_url %}
"url": "{{ page.canonical_url }}",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{{ page.canonical_url }}"
},
{% endif %}
{% if config.site_url %}
"publisher": {
"@type": "Organization",
"name": "Mozilla.ai",
"logo": {
"@type": "ImageObject",
"url": "{{ config.site_url }}images/any-llm-logo-mark.png"
}
},
{% endif %}
{% endif %}

{# Author (common to all types) #}
"author": {
"@type": "Organization",
"name": "Mozilla.ai",
"url": "https://mozilla.ai"
}
}
</script>
{% endif %}
{% endblock %}
9 changes: 9 additions & 0 deletions docs/providers.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
---
schema:
type: "TechArticle"
name: "Supported Providers - any-llm"
description: "Complete list of LLM providers supported by any-llm including OpenAI, Anthropic, Mistral, and more"
datePublished: "2024-03-15"
dateModified: "2024-11-18"
---

# Supported Providers

`any-llm` supports the below providers. In order to discover information about what models are supported by a provider
Expand Down
24 changes: 23 additions & 1 deletion docs/quickstart.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
## Quickstart
---
schema:
type: "HowTo"
name: "How to Install and Use any-llm"
description: "Step-by-step guide to installing any-llm and making your first API call with Python"
totalTime: "PT5M"
tool:
- "Python 3.11 or newer"
- "pip package manager"
supply:
- "API key from your chosen LLM provider"
steps:
- name: "Install any-llm"
text: "Install any-llm with your chosen providers using pip. Use the all option to install support for all providers."
url: "https://mozilla-ai.github.io/any-llm/quickstart/#installation"
- name: "Set up API keys"
text: "Configure your provider's API key as an environment variable. Make sure you have the appropriate environment variable set for your chosen provider."
url: "https://mozilla-ai.github.io/any-llm/quickstart/#api-keys"
- name: "Make your first completion call"
text: "Import the completion function from any-llm and create your first API call with your chosen model and provider"
url: "https://mozilla-ai.github.io/any-llm/quickstart/#your-first-api-call"
---


### Requirements

Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ nav:
- Get Started with: cookbooks/any_llm_getting_started.ipynb
theme:
name: material
custom_dir: docs/overrides
font:
text: Noto Sans
code: Noto Sans Mono
Expand Down