-
Notifications
You must be signed in to change notification settings - Fork 26
Improve DuckDB Store #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
5d5763e
add ability to make migrations for duckdb
cfahlgren1 947c93c
add arguments field
cfahlgren1 8ae13fa
remove duplicate fields between sql store and store
cfahlgren1 c51811a
wip
cfahlgren1 ddf1bc5
add migration to add arguments column
cfahlgren1 a39e160
update migration, drop synced at
cfahlgren1 d87ba4f
remove sync logic from duckdb, add migration for dropping synced_at, …
cfahlgren1 1b04ad4
add openai records table to migration
cfahlgren1 4bee1c4
remove synced_at in docling
cfahlgren1 ac69a92
add phi data agent example
cfahlgren1 0bd033c
update example
cfahlgren1 38461f8
Merge branch 'main' into cfahlgren1/improve-duckdb-store
cfahlgren1 f6ad116
remove synced at, use duckdb store as default
cfahlgren1 d966a22
fix messages not being saved
cfahlgren1 09b3e49
add function call for backwards compatibility
cfahlgren1 6768030
update openai example
cfahlgren1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,19 @@ | ||
| import os | ||
|
|
||
| from openai import OpenAI | ||
|
|
||
| from observers import wrap_openai | ||
|
|
||
| openai_client = OpenAI( | ||
| base_url="https://api-inference.huggingface.co/v1/", api_key=os.getenv("HF_TOKEN") | ||
| ) | ||
|
|
||
| openai_client = OpenAI() | ||
|
|
||
| client = wrap_openai(openai_client) | ||
|
|
||
| response = client.chat.completions.create( | ||
| model="Qwen/Qwen2.5-72B-Instruct", | ||
| messages=[{"role": "user", "content": "Tell me a joke."}], | ||
| model="gpt-4o", | ||
| messages=[{"role": "user", "content": "Tell me a joke in the voice of a pirate."}], | ||
| stream=True, | ||
| temperature=0.5, | ||
| ) | ||
| print(response) | ||
|
|
||
| for chunk in response: | ||
| if chunk.choices[0].delta.content: | ||
| print(chunk.choices[0].delta.content, end="", flush=True) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.