Can't use local Ollama

Hoe can i manage to get to use my ollama client? It keeps telling me that I have no registered a provide for my client type! How can i do that?
`import ell
import ollama
ell.init(verbose=True)
MODEL = "llama3.1:latest"
OLLAMA_API = "http://<IP_ADDRESS>:11434"
ell.config.register_model(MODEL, client)
ell.config.register_provider(...)
client = ollama.Client(host=OLLAMA_API)
@ell.simple(model=MODEL, client=client)
def hello(name : str) -> str:
"""You are a helpful assistant for chatbots."""
return f"Say hello to {name} with a poem."
response = hello("John Deo")
print(response)`
ERROR:  response = hello("John Deo")
^^^^^^^^^^^^^^^^^^^
File "....env\Lib\site-packages\ell\lmp_track.py", line 64, in tracked_func
return func_to_track(*fn_args, **fn_kwargs, _invocation_origin=invocation_id)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "....env\Lib\site-packages\ell\lmp\complex.py", line 64, in model_call
assert provider is not None, f"No provider found for client {ell_call.client}."
^^^^^^^^^^^^^^^^^^^^
AssertionError: No provider found for client <ollama._client.Client object at 0x0000014846AA70E0>.

"""
Ollama example.
"""
import ell

ell.init(verbose=True, store='./logdir')
# Use models automatically registered by asking ollama
ell.models.ollama.register(base_url="http://localhost:11434/v1")

# in terminal run ollama list to see available models
@ell.simple(model="llama3.1:latest", temperature=0.1)
def write_a_story():
    return "write me a story"

or do

# Or use the client directly
import openai
client = openai.Client(
    base_url="http://localhost:11434/v1", api_key="ollama"  # required but not used
)
@ell.simple(model="llama3.1:latest", temperature=0.1, max_tokens=100, client=client)
def write_a_story_with_client():
    return "write me a short story"

we don't support ollama directly, but you can use the openai compatible client like I do above!

Maybe I'll add thos later into the provider a;sp

thx!! it worked!


Add Anchor links to sections in the docs

It would be nice to link directly to various sections in the docs and developer guide via anchor links.
I happen to maintain a tool that helps with that and would be happy to help set it up.

I was planning on adding links to sections at some point. All of our documents already have anchors, since they are generated from .md files by jekyll, we just don't expose a menu anywhere yet.

I've added a PR with one possible approach.


Each reuse

Adds the Each.Reuse property to allow reusing existing nodes.
This experimental feature has some limtiations:

https://github.com/fusetools/fuselibs/issues/4218
https://github.com/fusetools/fuselibs/issues/4217
https://github.com/fusetools/fuselibs/issues/4219  (More of a feature)

This PR contains:

[x] Changelog
[x] Documentation - limited for new API
[x] Tests

This conflicts pretty badly with the current master, would you mind rebasing @mortoray?

@kusma Rebased.


remove dependency on unicode-slugify, use Django builtin function

Use django.utils.text.slugify with allow_unicode=True and remove unicode-slugify dependency (which causes conflicts with python-slugify and seems to be unnecessary.

It was long ago, but I think it was to support Cyrillic alphabets or fix issues with Cyrillic slugs' romanization.


Mystery Events showing "via GTM"

I've noticed lately that, in rare cases, dataslayer will report a tag as being "via GTM" when there is no such tag in the GTM container. This seems to happen when GTM is used for most of the implementation and a client has added something directly to the site that leverages gtag.js.
I've included a screencap of dataslayer with the mystery event called out. I've also included a text file of the script that seems to be sending that event.
lftracker_script.txt

The "via GTM" note in dataslayer is misleading and could be an issue for clients who have lots of tags. On our site, I was able to verify that it wasn't in our GTM container because we only have 18 tags right now; however, for a client with 150+ tags, it would be harder to check where the event is coming from.

@rptomey thanks for reporting this! This is a particularly interesting item that I haven't run across before, and will probably end up as a "won't fix" because of the same thing that makes it interesting... but I'd like to hear your feedback.
Let's start with a bit about where the "via GTM" note in dataslayer comes from.
Dataslayer detects that a GA tag has been fired from GTM by looking for a gtm parameter (which contains a variation of the GTM container ID) in the GA tag. This is set somewhere in the initial creation of the GA tracking object, which is then exposed to the Javascript environment of the page. Once that GA tracking object is created, all tags fired from it will have this gtm parameter set.
Normally, this is fine, even in more complicated variations, like:

if there were an additional GA object on the page itself that wasn't created by GTM (e.g. hard-coded analytics.js), it wouldn't have that set, and the parameter wouldn't appear in those calls
if there were an additional GTM container creating its own additional GA object, it would set the gtm parameter appropriately to the other container ID

Where it gets interesting is: the tracking script you shared piggybacks on the existing GA tracking object rather than creating its own. Because the only GA tracking object it can find is the one that was created by GTM (and therefore has this gtm value set), every tag that it fires using that tracking object looks to dataslayer like it was fired by GTM (because, in a sense, it was - it was fired by a 3rd party script using the GA object created by GTM - but dataslayer has no visibility into this chain of events).
So, it's a bit of a weird situation.
From the implementer's perspective, this tag wasn't fired through GTM, but from a technical perspective, it kind of was fired through GTM (in that it was fired through the GA object which wouldn't be there in the first place if GTM hadn't created it; and if it were firing through a GA object that hadn't been created by GTM, you wouldn't be seeing the "via GTM" note). In that sense, the issue you're seeing will probably never be "fixable", insofar as there's no way that I know of for dataslayer to differentiate a GA tag fired by GTM from a tag that lives outside of GTM and piggybacks on GTM's copy of GA.
That being said, I do also appreciate that the "via GTM" note you're seeing for this tag is factually incorrect from the implementer's perspective. Would being able to disable that note in the settings be of any help?

Hey Sean,
Thank you for your thorough explanation! I really appreciate the communication model of "first here's all the information you need to know about X in order to understand the reason for Y" and try to use that with my own clients.
I'd never noticed the "gtm" parameter in the collect request's query string. I understand completely now why it's a "won't fix", and I don't think being able to disable the note in settings is necessary.
I'm closing this issue so that you can check it off your list. I really appreciate that you taught me something new about GA collection, and I continue to appreciate how much easier your extension has made my job.
Ryan

@rptomey thanks for the kind words and glad you found it helpful! And thanks back at you for sharing plenty of info in your initial report which helped me figure this out quickly.


2: Browse Inventory

Create the Browse Inventory Layout and Activity
Implement the required controllers and models to produce this functionality

Leave a comment if you are working on one of the above and a comment when it is completed.
Don't forget to use TDD!

Did the first part with Daniel


Banner Image?

The avatar image translates nicely to Mastodon, but is there a way to also do a banner image?

How did you get an avatar image for the main site blog?

the avatar image and banner image for a main site blog are retrived from the theme options. learned the hard way because I use a self-made theme and never bothered to add theme options. :-) If you have a theme with those options, look for Design -> Customizer -> Header Image for the banner image. The avatar is the "website icon" in the custimizer.

Many thanks for the detailed info.  I'm using GeneratePress, and I thought I'd set all those, but I'll fiddle with something hardcoded like this.  (I see something converted things to SVG along the way too which might have been it)

Hi,
what makes this tricky to debug: depending on the instance there may be a stubborn cache involved, and even if your site is now using the site icin and custom header options, they won't show for quite a while in the fediverse.
I don't know if/how you would alter the function.php of a highly customisable theme like site press, but in theory it should use the options mentioned under the hood already.
You can see here https://github.com/Automattic/wordpress-activitypub/blob/7855437c5c287eb87ecdd685aeff6affc6032f2a/includes/model/class-blog-user.php#L149
which options are used for the avatar (and a few lines further down the one for the banner image)


Authorize via reverse proxy not working

Home Assistant release with the issue:

Home Assistant 0.80.0  (via Hass.io)
Last working Home Assistant release (if known):
Operating environment (Hass.io/Docker/Windows/etc.):

Hass.io
Component/platform:

https://www.home-assistant.io/components/google_assistant/
Description of problem:
I’m running Hass.IO behind a reverse nginx proxy.
    location /hassioproxy/ {
      include /config/nginx/proxy.conf;
      rewrite /hassioproxy/(.*) /$1 break;
      proxy_pass http://my.local.hassio:8123;

In configuration.yaml I have the entry
    http:
      base_url: https://my.external.url/hassioproxy

I can connect to the API endpoint at: https://my.external.url/hassioproxy/api/
When I browse to the authentication url: https://my.external.url/hassioproxy/auth/authorize
it redirects to: https://my.external.url/frontend_es5/authorize.html
So it seems the redirect doesn't take the reverse proxy into account.
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
    http:
      base_url: https://my.external.url/hassioproxy

Traceback (if applicable):

Additional information:
Already confirmed by awarecan it's an issue, see
https://community.home-assistant.io/t/v0-80-new-google-assistant-auth-behind-proxy-redirect-issue/72994

I was confused trying to set it up today. I have a variety of things on different paths like Octoprint, Jupyter Notebook, with authentication managed through the nginx.
Even if base_url doesn't support paths, X-Script-Name header would help. That's a standard approach for what I think you're imagining "virtual_path" configuration would be.

i use an nginx reverse proxy and do not currently have any issues on 83+
Can one of you please test and see if this is still a problem?

i use an nginx reverse proxy and do not currently have any issues on 83+
Can one of you please test and see if this is still a problem?

Just tested on 0.89, for the issue is still present.
@marchingphoenix can you post your nginx config perhaps?

It seems that nobody (from the home assistant team) cares about this, but why?!
Are there really just a hand full people which want to use a stable and extensively tested reverse proxy in front of (sometimes beta-like) home assistant?!

Reverse proxy works, we have tons of guide in the community to show you the way. The issue here is about host HA in a virtual path, and it is complex. The most recent discussion at here: https://github.com/home-assistant/architecture/issues/156

Got it workin tonight via https://community.home-assistant.io/t/nginx-reverse-proxy-set-up-guide-docker/54802
Its not using the path but a subdomain, for me this workaround suits my needs for now.

Going to close this as we don't intend to support this now, and no one is going to work on this in the foreseeable future.


:sparkles: Allow Annotated FieldInfo with default values

This allows creating annotated arguments (Body/Path/Query) with default value definition as part of the FieldInfo instance.
Which allows:

setting up default value for the FastAPI endpoint that will not be part of the function definition if called directly (see test).
setting the default value in a shared annotated type e.g. Verbose=Annotated[bool, Query(True)].

@tiangolo Thanks for merging #9315 🙏
I needed it to open this PR as it was based on it...
Also, I wonder how do you feel with this suggested feature?
I find it fairly simple and helpful, you might be able to achieve it using an extra Depends, but this I think this is way shorter and also fits well to the FastAPI & Pydantic ecosystem

Need it badly

Thanks @sharonyogev!
But I think that the default value should be on the default value of the parameter, not having a default value in the function but having it in Annotated would mean that the code would behave in one way in some situations (e.g. with FastAPI) and a different way in others (calling it directly). And avoiding that was one of the main reasons to support Annotated, that the code should behave as consistently as possible to make it easier to use, reuse, and think about.
So I'll pass on this, but thanks for the interest! ☕


[FEATURE] OCPP: Implement missing OCPP 1.6 commands

Duplicate issue

[X] I've searched for any related issues and avoided creating a duplicate issue.

Description
See README.md for the list.
Attachments
No response

The firmware update is the most awaited command:

handle an archive type like tar
define a JSON file format to simulate the target firmware version and update behavior, like

{
	"firmwareVersion": "",
	"reset": true/false
	"resetDelay": ""
}

implement the OCPP command with the archive download from FTP
implement the firmware update simulation

The second most awaited command is get charging profile.

PR https://github.com/SAP/e-mobility-charging-stations-simulator/pull/574 implements:

ReserveNow
CancelReservation

The first OCPP 2 command to implement is "GetBaseReport".
To do it:

Mock OCPP 2 server with the mobility house framework
Document the OCPP 2 mock building
Add request/response payload types definition
Identify the payload validation JSON schemas
Add the payload validation JSON schemas in the proper OCPP payload validation hooks
Identify the file module to where the command implementation should be added
Implement and hook the command code in the OCPP 2 code
Test with the mock OCPP 2 server


[Feature][Config UI] Search or write RegEx to bulk select Jenkins jobs

Search before asking

[X] I had searched in the issues and found no similar feature requirement.

Use case
The Jenkins folder structure at Set Data Scope is often convoluted and requires users to open each folder to find and select the jobs they want. Our Slack user @aubertaa has raised a use case related to this problem:

Description/Solution
Please see the comment.
No response
Related issues
No response
Are you willing to submit a PR?

[ ] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

The best option is to provide a search field and list all job names that match the searched name and allow users to select all (shown in the screenshot above, ask me for the Figma link). If this option is not technically feasible, then the second option is to ask users to fill in the RegEx.

We will put this issue on hold because Jenkins doesn't have search API.


Bug: filter_if is falling over in Example on Website

What happened?
Examples looks like it is falling over on website

Session Information
Found on website
Reproducible Example
Unsure on the first one example
If I change filter_if(admiral_vs, rlang::quo(VSTESTCD == "Weight")) to filter_if(admiral_vs, rlang::quo(VSTESTCD == "WEIGHT")) it produces a results.

If I run these examples in the console they produce a result without error (altough the second one returns 0 rows as it should indeed be "WEIGHT"):

Maybe is doesn't like the size of the data that it is being asked to display?

I would try adding
library(admiral)

I could reproduce the error by not loading admrial but loading dplyr.

Works!  @bundfussr Thanks!!


WeChat blocked in startup

Hi, I just tried using this witha fresh installed Ubuntu
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.1 LTS
Release:	20.04
Codename:	focal

Just installed docker and tried applying the base command as in the README curl -sL https://raw.githubusercontent.com/huan/docker-wechat/master/dochat.sh | bash and it's stuck in starting. Logs are empty
The screen is as the following

It's been like this for at least 10min already, I assume it's frozen

+1 for me.
Ubuntu 20.10

+1 for me.
Ubuntu 20.10

same as me
Ubuntu  18.04

same as me
Ubuntu  18.04

Same here
Ubuntu 20.04

same as me
Ubuntu 18.04

I tried 18.04 too and got the same problem

For those who are using a multi-monitor system: #28 still persists.

Same here
Archlinux
kernel: 5.10.16-arch1-1


When repeated short and long =value flags are aliases, only one is deserialised

Sorry for the title... essentially when [-a... | --long-a=<val>] the value is only deserialised for the one specified in the struct. Contrast [-b | --bee] as Boolean flags, when the value of whichever is given is available as e.g. flag_bee; flag_b need not be specified.

Here's a reproduction:
[dependencies]
docopt = { version = "1.0.1"}
log = {version = "0.4.5"}
serde = { version = "1.0.76" }
serde_derive = { version = "1.0.76" }
stderrlog = { version = "0.4.1"}

extern crate docopt;
#[macro_use]
extern crate log;
#[macro_use]
extern crate serde_derive;
extern crate stderrlog;

use docopt::Docopt;

const USAGE: &'static str = "
Reproduction.

Usage:
  repro [-q | --quiet | -v... | --verbosity=<v>]

Options:
  -q --quiet                Disable stderr logging.
  -v... --verbosity=<v>     Verbosity of stderr logging.
";

#[derive(Debug, Deserialize)]
struct Args {
    flag_quiet: bool,
    flag_verbosity: usize,
}

fn main() {
   let args: Args = Docopt::new(USAGE)
        .and_then(|d| d.deserialize())
        .unwrap_or_else(|e| e.exit());

    println!("{:?}", args);

    stderrlog::new()
            .module(module_path!())
            .quiet(args.flag_quiet)
            .timestamp(stderrlog::Timestamp::Second)
            .verbosity(args.flag_verbosity)
            .init()
            .unwrap();
    trace!("trace message");
    debug!("debug message");
    info!("info message");
    warn!("warn message");
    error!("error message");
}

Then:
$ cargo run -- --verbosity=2
Args { flag_quiet: false, flag_verbosity: 2 }
2018-09-03T20:50:56+01:00 - INFO - info message
2018-09-03T20:50:56+01:00 - WARN - warn message
2018-09-03T20:50:56+01:00 - ERROR - error message

so far so good.
$ cargo run -- -vvv
Args { flag_quiet: false, flag_verbosity: 0 }
2018-09-03T20:51:43+01:00 - ERROR - error message

Not so good. I thought maybe the issue was using the short while deserialising the long name, but:
$ cargo run -- -q
Args { flag_quiet: true, flag_verbosity: 0 }

so it does appear to be the interaction between ... and =<v>.

Less-than-ideal workaround with particular respect to integer flags, just in case someone stumbles here with a similar use case:

separate lines in Options
add flag_v: usize, toArgs
.verbosity(args.flag_verbosity + args.flag_v) (since docopt takes care of at most one being non-zero)

I don't think this is a bug. A flag can't both simultaneously accept a value and be a countable switch AFAIK.

Thanks for the fast response. I could readily accept that, when you put it like that, but it does seem to work in the Python implementation.
See here - not allowed both, but works when you delete one or other.
Of course, the python implementation (and by extension the online thing) differ in not having serde build a struct of args and flags.
So I suppose it's really a question for you & team whether it should be allowed or not.
If I may advocate for my desired behaviour: I'd say it's consistent with:
-q --quiet  Be quiet.

implying that either flag can be used and be accessible on Args#<either>.
Supporting it would of course mean that it'd only work for integer value flags; not a mix of countable switch and string flag, for example.

Feel free to close if not something you want to support, understood.


Replaced string literals with constant variables: Enables compile time checking of usages

String literals were being used for named annotations. They ran the risk of not being consistent in their usages due to typos or otherwise. To enable strict compile-time checking, it is suggested to use constants to store these literals and use the constants everywhere.

Opened a superset at https://github.com/intuit/wasabi/pull/178. Closing this one.


Handel and verify method entry

EX: Client can not call method with null arguments.
Make customerName as a required field.

make customerName @Column(nullable = false)


🐛 Mobile | No QR Code Generated

Cc: @AntPolkanov; @zacharykeeping
Hi
New user setting up rewards app.
No QR is generated.
Tasks

[ ] Investigate
[ ] Fix

Environment

Device: [e.g. iPhone 13]
OS: [e.g. iOS]

Screenshots

Thanks!

Might be related #830

Hey @arig2024
I believe a staff profile is required for the QR code to be generated, and I don't see a profile set up for you. Have you completed the SugarLearning item to set up your staff profile in Rewards? If not, you'll have to complete that first, and then you should start seeing that QR code.

Closing this one off. Feel free to open another PBI if you complete your profile and still see this issue. 🙂


Multiple Version of API is not working woth toml file changes WSO2 APIM 3.0.0

Multiple Version of API is not working with deployment.toml file changes WSO2 APIM 3.0.0.
Steps
1.Added below configuration in Devportal to display mutiple versions of API.
2.Getting an error while starting the server.
[apim.devportal]
display_multiple_versions = true

Did you try this in a WUM updated pack? I believe we fixed this with https://github.com/wso2/product-apim/issues/6710

Fix: https://github.com/wso2/carbon-apimgt/pull/7828/files