mirror of
https://github.com/amithkoujalgi/ollama4j.git
synced 2025-05-15 03:47:13 +02:00
Merge pull request #124 from ollama4j/113-tests-fix
All checks were successful
Mark stale issues / stale (push) Successful in 42s
All checks were successful
Mark stale issues / stale (push) Successful in 42s
Added search for docs
This commit is contained in:
commit
c2e4e3fa7f
26
docs/docs/apis-extras/bearer-auth.md
Normal file
26
docs/docs/apis-extras/bearer-auth.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 2
|
||||||
|
---
|
||||||
|
|
||||||
|
# Set Bearer Authentication
|
||||||
|
|
||||||
|
This API lets you set the bearer authentication for the Ollama client. This would help in scenarios where
|
||||||
|
Ollama server would be setup behind a gateway/reverse proxy with bearer auth.
|
||||||
|
|
||||||
|
After configuring bearer authentication, all subsequent requests will include the Bearer Auth header.
|
||||||
|
|
||||||
|
```java
|
||||||
|
import io.github.ollama4j.OllamaAPI;
|
||||||
|
|
||||||
|
public class Main {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
|
||||||
|
String host = "http://localhost:11434/";
|
||||||
|
|
||||||
|
OllamaAPI ollamaAPI = new OllamaAPI(host);
|
||||||
|
|
||||||
|
ollamaAPI.setBearerAuth("YOUR-TOKEN");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
@ -150,6 +150,29 @@ const config = {
|
|||||||
darkTheme: prismThemes.dracula,
|
darkTheme: prismThemes.dracula,
|
||||||
additionalLanguages: ['java'],
|
additionalLanguages: ['java'],
|
||||||
},
|
},
|
||||||
|
algolia: {
|
||||||
|
// The application ID provided by Algolia
|
||||||
|
appId: '7HJ3MZ6GBX',
|
||||||
|
// Public API key: it is safe to commit it
|
||||||
|
apiKey: '3037a6d8706a6347b1844ca6ecd582b0',
|
||||||
|
indexName: 'ollama4jio',
|
||||||
|
// Optional: see doc section below
|
||||||
|
contextualSearch: true,
|
||||||
|
// Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them.
|
||||||
|
externalUrlRegex: 'external\\.com|domain\\.com',
|
||||||
|
// Optional: Replace parts of the item URLs from Algolia. Useful when using the same search index for multiple deployments using a different baseUrl. You can use regexp or string in the `from` param. For example: localhost:3000 vs myCompany.com/docs
|
||||||
|
replaceSearchResultPathname: {
|
||||||
|
from: '/docs/', // or as RegExp: /\/docs\//
|
||||||
|
to: '/',
|
||||||
|
},
|
||||||
|
// Optional: Algolia search parameters
|
||||||
|
searchParameters: {},
|
||||||
|
// Optional: path for search page that enabled by default (`false` to disable it)
|
||||||
|
searchPagePath: 'search',
|
||||||
|
// Optional: whether the insights feature is enabled or not on Docsearch (`false` by default)
|
||||||
|
insights: false,
|
||||||
|
//... other Algolia params
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
markdown: {
|
markdown: {
|
||||||
mermaid: true,
|
mermaid: true,
|
||||||
|
32136
docs/package-lock.json
generated
32136
docs/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,46 +1,47 @@
|
|||||||
{
|
{
|
||||||
"name": "ollama-4-j",
|
"name": "ollama-4-j",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docusaurus": "docusaurus",
|
"docusaurus": "docusaurus",
|
||||||
"start": "docusaurus start",
|
"start": "docusaurus start",
|
||||||
"build": "docusaurus build",
|
"build": "docusaurus build",
|
||||||
"swizzle": "docusaurus swizzle",
|
"swizzle": "docusaurus swizzle",
|
||||||
"deploy": "docusaurus deploy",
|
"deploy": "docusaurus deploy",
|
||||||
"clear": "docusaurus clear",
|
"clear": "docusaurus clear",
|
||||||
"serve": "docusaurus serve",
|
"serve": "docusaurus serve",
|
||||||
"write-translations": "docusaurus write-translations",
|
"write-translations": "docusaurus write-translations",
|
||||||
"write-heading-ids": "docusaurus write-heading-ids"
|
"write-heading-ids": "docusaurus write-heading-ids"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@docusaurus/core": "^3.4.0",
|
"@docsearch/js": "^3.9.0",
|
||||||
"@docusaurus/plugin-google-gtag": "^3.4.0",
|
"@docusaurus/core": "^3.4.0",
|
||||||
"@docusaurus/preset-classic": "^3.4.0",
|
"@docusaurus/plugin-google-gtag": "^3.4.0",
|
||||||
"@docusaurus/theme-mermaid": "^3.4.0",
|
"@docusaurus/preset-classic": "^3.4.0",
|
||||||
"@mdx-js/react": "^3.0.0",
|
"@docusaurus/theme-mermaid": "^3.4.0",
|
||||||
"clsx": "^2.0.0",
|
"@mdx-js/react": "^3.0.0",
|
||||||
"prism-react-renderer": "^2.3.0",
|
"clsx": "^2.0.0",
|
||||||
"react": "^18.0.0",
|
"prism-react-renderer": "^2.3.0",
|
||||||
"react-dom": "^18.0.0"
|
"react": "^18.0.0",
|
||||||
},
|
"react-dom": "^18.0.0"
|
||||||
"devDependencies": {
|
},
|
||||||
"@docusaurus/module-type-aliases": "^3.4.0",
|
"devDependencies": {
|
||||||
"@docusaurus/types": "^3.4.0"
|
"@docusaurus/module-type-aliases": "^3.4.0",
|
||||||
},
|
"@docusaurus/types": "^3.4.0"
|
||||||
"browserslist": {
|
},
|
||||||
"production": [
|
"browserslist": {
|
||||||
">0.5%",
|
"production": [
|
||||||
"not dead",
|
">0.5%",
|
||||||
"not op_mini all"
|
"not dead",
|
||||||
],
|
"not op_mini all"
|
||||||
"development": [
|
],
|
||||||
"last 3 chrome version",
|
"development": [
|
||||||
"last 3 firefox version",
|
"last 3 chrome version",
|
||||||
"last 5 safari version"
|
"last 3 firefox version",
|
||||||
]
|
"last 5 safari version"
|
||||||
},
|
]
|
||||||
"engines": {
|
},
|
||||||
"node": ">=18.0"
|
"engines": {
|
||||||
}
|
"node": ">=18.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user