Skip to content

Commit

Permalink
Merge pull request #1 from solderneer/1.1.3
Browse files Browse the repository at this point in the history
1.1.3
  • Loading branch information
solderneer authored Jul 18, 2023
2 parents a41de8d + 3dfe7a9 commit fdd6fb8
Show file tree
Hide file tree
Showing 13 changed files with 558 additions and 115 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) [year] [fullname]
Copyright (c) 2023 Sudharshan Sundaramahalingam

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Powered by [Supabase Vector](https://supabase.com/vector) and the [OpenAI API](h
- ✅ Semantic search over your notes
- ✅ Talk to your notes
- ✅ Simple unified UI
- ✅ Public endpoint to allow others to talk to your notes

## Wishlist
- Public endpoint for others to talk to selected notes **(working on it!)**
- Suggest related notes to link to the active note
- Suggest tags for note
- Hybrid search with keyword and semantic matching
Expand Down
3 changes: 1 addition & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"id": "ai-tools",
"name": "AI Tools",
"version": "1.1.2",
"version": "1.1.3",
"minAppVersion": "0.15.0",
"description": "Adding powerful semantic search, generative answers, and other AI tools to Obsidian, using Supabase + OpenAI.",
"author": "solderneer",
"authorUrl": "https://solderneer.me",
"fundingUrl": "",
"isDesktopOnly": "true"
}
24 changes: 5 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-ai-tools",
"version": "1.1.2",
"version": "1.1.3",
"description": "Adding powerful semantic search, generative answers, and other AI tools to Obsidian, using Supabase + OpenAI.",
"main": "main.js",
"scripts": {
Expand Down Expand Up @@ -28,7 +28,6 @@
"gpt-tokenizer": "^2.1.1",
"openai": "^3.3.0",
"openai-edge": "^1.2.0",
"typed.js": "^2.0.16",
"yaml": "^2.3.1"
"typed.js": "^2.0.16"
}
}
6 changes: 4 additions & 2 deletions src/generate-embeddings.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as yaml from "yaml";
import * as path from "path";

import {parseYaml} from "obsidian";
import { SupabaseClient } from "@supabase/supabase-js";
import { OpenAIApi } from "openai-edge";
import { createHash } from "crypto";
Expand Down Expand Up @@ -202,8 +202,10 @@ function parseMarkdown(markdown: string): {
if (match && match[1]) {
const frontmatterString = match[1];
try {
frontmatter = yaml.parse(frontmatterString); // Use yaml.parse() to parse YAML frontmatter
frontmatter = parseYaml(frontmatterString);
content = content.replace(match[0], ""); // Remove frontmatter from content
console.log(frontmatter)
console.log(content)
} catch (error) {
console.error(`Error parsing frontmatter: ${error}`);
}
Expand Down
Loading

0 comments on commit fdd6fb8

Please sign in to comment.