Skip to content

Commit

Permalink
docs: fix embeddings tabs (#28193)
Browse files Browse the repository at this point in the history
- Update fake embeddings to deterministic fake embeddings
- Fix indentation
  • Loading branch information
ccurme authored Nov 18, 2024
1 parent 6dfea7e commit 018f410
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions docs/src/theme/EmbeddingTabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export default function EmbeddingTabs(props) {
{
value: "Fake",
label: "Fake",
text: `from langchain_core.embeddings import FakeEmbeddings\n\n${embeddingVarName} = FakeEmbeddings(${fakeEmbeddingParamsOrDefault})`,
text: `from langchain_core.embeddings import DeterministicFakeEmbedding\n\n${embeddingVarName} = DeterministicFakeEmbedding(${fakeEmbeddingParamsOrDefault})`,
apiKeyName: undefined,
packageName: "langchain-core",
default: false,
Expand All @@ -153,9 +153,7 @@ export default function EmbeddingTabs(props) {
{tabItems
.filter((tabItem) => !tabItem.shouldHide)
.map((tabItem) => {
const apiKeyText = tabItem.apiKeyName ? `import getpass
os.environ["${tabItem.apiKeyName}"] = getpass.getpass()` : '';
const apiKeyText = tabItem.apiKeyName ? `import getpass\n\nos.environ["${tabItem.apiKeyName}"] = getpass.getpass()` : '';
return (
<TabItem
value={tabItem.value}
Expand Down

0 comments on commit 018f410

Please sign in to comment.